PureBytes Links
Trading Reference Links
|
At 09:49 PM 11/15/2003, DH wrote:
>> IF CCISCH=1 THEN IF CCISTR=TRUE THEN CCISTRA=TRUE
>> ELSE CCISTRA=FALSE;
>
>Those kind of constructs always make me nervous because I don't trust EL
>to know which IF/THEN the ELSE is meant to go with. Maybe it does it
>right every time but I've learned to never take anything like that for
>granted so I talk to EL like it's a retarded child. :-) I usually use
>BEGIN/END statements to make certain EL and I are on the same page but
>parentheses would probably force it to do the right thing as well. Just
>for fun, try some parentheses with the one that doesn't work, something
>like this....
>
>IF CCISCH=1 THEN (IF CCISTR=TRUE THEN CCISTRA=TRUE
> ELSE CCISTRA=FALSE);
I agree completely with Dennis.
NEVER assume that the EasyLanguage compiler will parse a complex expression correctly!
ALWAYS force it to do what you would like with parentheses... I have spent endless hours debugging correct code that compiles incorrectly.
In addition, it makes your code easier to understand later so is not a bad thing to do anyway.
Bob Fulks
|