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 👉 http://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc
SPL Learning Material 👉 http://c.scudata.com
SPL Source Code and Package 👉 https://github.com/SPLWare/esProc
Discord 👉 https://discord.gg/ydhVnFH9
Youtube 👉 https://www.youtube.com/@esProc_SPL