NsExpr plug-in: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(Created page with "{{PageAuthor|Afrow UK}} == Description == A small plug-in that evaluates Boolean and mathematical expressions. == Download == <attach>NsExpr.zip</attach> Stu [[Category:Plugi...")
 
No edit summary
 
Line 3: Line 3:
== Description ==
== Description ==
A small plug-in that evaluates Boolean and mathematical expressions.
A small plug-in that evaluates Boolean and mathematical expressions.
<highlight-nsis>
!include nsExpr.nsh
...
; Executes code given an expression is true.
${If} ${Expr} `$R0 == 0 || $R1 == 1`
; Loops while the expression is true.
${DoWhile} ${Expr} `(R9 > 10 || r9 != 5) && R2 > 3`
; Evaluates an expression and returns the result in $R0
${ExprEval} `$R2 < 2 && ($R2 + 5) >= 3` $R0
</highlight-nsis>


== Download ==
== Download ==

Latest revision as of 13:02, 12 January 2012

Author: Afrow UK (talk, contrib)


Description

A small plug-in that evaluates Boolean and mathematical expressions.

!include nsExpr.nsh
...
 
; Executes code given an expression is true.
${If} ${Expr} `$R0 == 0 || $R1 == 1`
 
; Loops while the expression is true.
${DoWhile} ${Expr} `(R9 > 10 || r9 != 5) && R2 > 3`
 
; Evaluates an expression and returns the result in $R0
${ExprEval} `$R2 < 2 && ($R2 + 5) >= 3` $R0

Download

NsExpr.zip (28 KB)

Stu