Re: Task ids weird behavior

new topic     » goto parent     » topic index » view thread      » older message » newer message
AndySerpa said...

Statements like:

if task_self() = 2 then 
.. 
end if 

never evaluate as true. It is acting as if the task id returned from task_self is a float that isn't quite equal to the integer value.

In short, task_ids ( at least the ones returned from task_self() ) in if statements aren't being treated as integers and can't even be compared to integers unless you convert to an integer with something like floor().

What's up with that?

(This seems to hold for both Eu v3 & v4)

This behavior appears to be by design. The tid is set specifically as a double internally, not an int. I am not aware of the specific reasons for this design, but its not a bug or a mistake or an accident.

AndySerpa said...

This behavior seems restricted to if statements.

I have no idea why that's the case. Maybe that is a bug.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu