Ideas for new features & functions
Moderators: Dorian (MJT support), JRL
-
Grovkillen
- Automation Wizard
- Posts: 1132
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
-
Contact:
Post
by Grovkillen » Wed Dec 15, 2021 10:18 am
It would be useful to be able to set the operator programmatically instead of hardcoded like it's now.
Code: Select all
Let>OPERATOR=+
Let>TERM_1=20
Let>TERM_2=12
Let>RESULT={(%TERM_1% + %TERM_2%)}
//These are not working... could be useful if they did
Let>RESULT={(%TERM_1% %OPERATOR% %TERM_2%)}
Let>FULL_FUNCTION=%TERM_1% %OPERATOR% %TERM_2%
Let>RESULT={(%FULL_FUNCTION%)}
-
JRL
- Automation Wizard
- Posts: 3526
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Wed Dec 15, 2021 9:20 pm
This works for me.
Code: Select all
Let>OPERATOR=+
Let>TERM_1=20
Let>TERM_2=12
LabelToVar>Full_Function,vCode
IncludeFromVar>vCode
MDL>res
Let>OPERATOR=-
Let>TERM_1=44
Let>TERM_2=19
LabelToVar>Full_Function,vCode
IncludeFromVar>vCode
MDL>res
/*
Full_Function:
Let>RES={(%Term_1% %OPERATOR% %Term_2%)}
*/
-
Grovkillen
- Automation Wizard
- Posts: 1132
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
-
Contact:
Post
by Grovkillen » Thu Dec 16, 2021 9:00 am
Ah! Smart, thank you for this.
-
hagchr
- Automation Wizard
- Posts: 331
- Joined: Mon Jul 05, 2010 7:53 am
- Location: Stockholm, Sweden
Post
by hagchr » Thu Dec 16, 2021 11:59 am
Or use tmp variable
Code: Select all
Let>OPERATOR=+
Let>TERM_1=20
Let>TERM_2=12
Let>RESULT={(%TERM_1% + %TERM_2%)}
Let>tmp=%TERM_1% %OPERATOR% %TERM_2%
Let>RESULT={tmp}
-
JRL
- Automation Wizard
- Posts: 3526
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Mon Dec 20, 2021 2:01 pm
Nice solution! I like it!
-
Grovkillen
- Automation Wizard
- Posts: 1132
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
-
Contact:
Post
by Grovkillen » Mon Dec 20, 2021 2:45 pm
Clean! Thanks!!