General

if then else shorthand a?b:c

Started by Softcore on .

Sign in or create an account to join the conversation.

3 posts

Hi
There are some things the shorthand is suited to and other things it isn't - it not a straight drop in replacement . .
Though depending on what you are wanting to do, (and where?) there are ways to get around it

For example - try an expression x=a?b:x then Monitor x
x only changes if a is true and nothing seems to be returned else wise - does not return 0 ...
It seems to work - maybe the : ref to x just gets seen a false or null and nothing happens

Cheers
MM