Page 1 of 1

what does a "?" and "1ex" do in script editor?x = any letter

PostPosted: Fri Feb 01, 2008 9:16 pm
by DarkParadox
for example when i type a ? i turns blue like this : ? that also happens when i type 1ev: 1ev.

Re: what does a "?" and "1ex" do in script editor?x = any letter

PostPosted: Sat Feb 02, 2008 6:40 pm
by makslane
Are just syntax highlighting.
The operator ? is used to make ternary condition, like this:

Code: Select all
x = y > 10? 20: 30;


if equal to:

Code: Select all
if(y > 10) x = 20;
else x = 30;


About the 1ex, I think is a bug in the syntax highlight
.

Re: what does a "?" and "1ex" do in script editor?x = any letter

PostPosted: Thu Feb 07, 2008 10:36 pm
by DarkParadox
thanks makslane:
(^_^)