Small syntax problem

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

Rob:
I tried to use:
return not not x
but a syntax error was reported.
This is not a meaningless sentence. I tried to return a 0 or an 1 according
to x being 0 or not 0. Of course, this can be bypassed as follows:
return not (not x)
or:
return x != 0 (which is faster?)
Then I tried - - x and +  + x, but none worked.
I don't know if you think worthwhile to say something about this in the
reference manual.
Regards.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu