Calculating expression
Example1: No variable
Write SPL script:
A |
|
1 |
=eval("(1+1)*2") |
A1 The eval function dynamically phrases and calculates the expression, and the calculated result is 4
Example 2: Variables
Write SPL script:
A |
|
1 |
=eval("a=1") |
2 |
=eval("if(a>2,1.5,0.5)") |
A1 The eval function dynamically phrases and calculates the expression, and the variable a is assigned 1
A2 The eval function dynamically phrases and calculates the expression. The calculation result is 0.5
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc_Desktop/
SPL Learning Material 👉 https://c.scudata.com
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProcDesktop
Linkedin Group 👉 https://www.linkedin.com/groups/14419406/