Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I have an If statement in the load script with a quite long if-clause which I like to write over multiple lines for a nicer view. Something like this:
If variable_a = 1 // case 1
or ( variable_a = 2 and variable_b = 3 ) // case 2
or ( variable_a = 3 and variable_b = 5 ) // case 3
then
DO SOMETHING
else
DO SOMETHING ELSE
endif;
Unfortunatly, it is not working like this.
Any ideas?
interesting, if you put the condition in a variable (I don't like it) it seems to work
LET variable_a=3;
LET variable_b=5;
LET test=
variable_a = 1 // case 1
or ( variable_a = 2 and variable_b = 3 ) // case 2
or ( variable_a = 3 and variable_b = 5 ); // case 3
If $(test) then
trace DO SOMETHING;
else
trace DO SOMETHING ELSE;
endif;
Try this with dollar sign may be:
If $(variable_a) = 1 // case 1
or ( $(variable_a) = 2 and $(variable_b) = 3 ) // case 2
or ( $(variable_a) = 3 and $(variable_b) = 5 ) // case 3
It seems you cannot go ahead ...
Try with:
If variable_a = 1 or // case 1
( variable_a = 2 and variable_b = 3 ) or // case 2
( variable_a = 3 and variable_b = 5 ) // case 3
then
DO SOMETHING
else
DO SOMETHING ELSE
endif;
interesting, if you put the condition in a variable (I don't like it) it seems to work
LET variable_a=3;
LET variable_b=5;
LET test=
variable_a = 1 // case 1
or ( variable_a = 2 and variable_b = 3 ) // case 2
or ( variable_a = 3 and variable_b = 5 ); // case 3
If $(test) then
trace DO SOMETHING;
else
trace DO SOMETHING ELSE;
endif;
Hey Massimo,
you are right, this is not very elegant , but nevertheless it is working and helps me to write my code more clearly arranged.
Thanks a million
u.