Re: a question about syntax

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

> Do you know how to do this little thing with eu :
> ex :
> (with C)
> bool flag, flag2;
> flag = RandomBoolValue();
> flag2 = !flag;
> 
> is there a quicker way than :
>  
> integer flag, flag2
> flag=RandomTrueFalse()
> 
> if flag=true then flag2=false
> else flag2=true
> end if 
> 
> ?

Try
----------
integer a,b
a=2-rand(2)
b = not a -- your task,  "not"  in Eu  instead of "!"  in C
? a 
? b
----------

regards
 Igor Kachan

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

Search



Quick Links

User menu

Not signed in.

Misc Menu