Let>text=1998-2004
MessageModal>%text%
will show the value of '-6' because the variable 'text'
automatically evaluates to an integer.
The following workarounds are ok within one script,
but when I pass the variable to another script, it gets
evaluated as an integer again.
// Workaround 1
Let>text=1
// ConCat makes the variable text into a string for this script
ConCat>text,998-2004
MessageModal>%text%
// But this makes it back into an integer
Macro>NextScript /var1=%text%
// Workaround 2
// The hidden character makes this into a string, ok for this script
Let>text=1998-2004%CR%
MessageModal>%text%
// But this makes it back into an integer
Macro>NextScript /var1=%text%
Thanks,
tomasz
How do you declare a string, e.g. '1998-2004' ?
Moderators: Dorian (MJT support), JRL
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
See reply moved to duplicate posting at:
http://www.mjtnet.com/forum/posting.php ... eply&t=961
http://www.mjtnet.com/forum/posting.php ... eply&t=961
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!