Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
Jerry Thomas
- Macro Veteran
- Posts: 267
- Joined: Mon Sep 27, 2010 8:57 pm
- Location: Seattle, WA
Post
by Jerry Thomas » Fri Mar 21, 2014 12:24 am
I need to perform a Complex Expression with part of the equation being a test for True / False, and I can't get syntax worked out.
Many thanks for a little bit of help!
For these values, the logic should drop into the loop.
Code: Select all
Let>XYZ=60
Let>Cnt=0
Let>State=True
While{(%State%=True)and(%Cnt%<XYZ>Cnt=10000
EndWhile
While{(%State%=TRUE)and(%Cnt%<XYZ>Cnt=20000
EndWhile
While{(%State%=%True%)and(%Cnt%<XYZ>Cnt=30000
EndWhile
While{(%State%=%TRUE%)and(%Cnt%<XYZ>Cnt=40000
EndWhile
//These next 2 generate errors "Line: 22 T not appropriate"
While{(%State%="True")and(%Cnt%<XYZ>Cnt=50000
EndWhile
//Error "Line: 27 T not appropriate"
While{(%State%="TRUE")and(%Cnt%<XYZ>Cnt=60000
EndWhile
MDL>cnt
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Fri Mar 21, 2014 2:48 pm
Your code appears to be mangled.
However, you have the > missing after While. The first lot won't work because State is a variable assigned the STRING value "True".
This works:
Code: Select all
Let>State=True
Let>Cnt=0
Let>XYZ=60
While>{(%State%="True") and (%Cnt%<%XYZ%)}
Let>Cnt=50000
EndWhile
BTW - I'm guessing that is the structure your code was meant to have before it was garbled but I may be wrong.
-
Jerry Thomas
- Macro Veteran
- Posts: 267
- Joined: Mon Sep 27, 2010 8:57 pm
- Location: Seattle, WA
Post
by Jerry Thomas » Fri Mar 21, 2014 3:00 pm
Thanks for not laughing (at least in your reply)
I was so focused on the quotes and syntax...
Many Thanks Marcus!