Hi All!
I was wondering if anyone else found issues when trying logical expressions like "and" , "or" ?
Example:
if (value > 12)and(value < 24) = true then begin
I can't seem to figure out why I keep running into problems and it will not enter my condition.
Any guesses?
-s
Scripting Conditional Statements with Logical Expression
-
sephult
- Member
- Posts: 1144
Well I guess I solved my issue:
FYI
if (value > 12)and(value < 24) = true then begin
should be
if (value > 12)and(value < 24) then begin
because the boolean is assumed and doesn't need to be defined for the condition.
-s
FYI
if (value > 12)and(value < 24) = true then begin
should be
if (value > 12)and(value < 24) then begin
because the boolean is assumed and doesn't need to be defined for the condition.
-s
"Every act of creation is first an act of destruction." -Picasso
-
shawnb
- Member
- Posts: 190
- Location: San Francisco
- Contact:
True & False do not work as expected... Comparing them to conditions compiles clean, but always returns false.
Address the process rather than the outcome. Then, the outcome becomes more likely. - Fripp
-
shawnb
- Member
- Posts: 190
- Location: San Francisco
- Contact:
Oddly, comparing them to 1 and 0 seems to work.
Just not conditions.
Just not conditions.
Address the process rather than the outcome. Then, the outcome becomes more likely. - Fripp
