- DIESEL String Functions
- -----------------------
-
- $(+,,,...)
- The sum of the numbers , , ... is returned.
- Example:
- (menucmd "m=$(+,1,2)")
- "3"
-
- (menucmd "m=$(+,2,1)")
- "3"
-
- (menucmd "m=$(+,1,2,1)")
- "4"
-
- (menucmd "m=$(+,1,2,3)")
- "6"
-
- (menucmd "m=$(+,1,2,3,4,5,6)")
- "21"
-
- ; (menucmd "m=EXPRESSION")used to give the result in VLIDE
- ; in FIELDS we us EXPRESSION ONLY
-
-
- ; The result can used as variable but be note that the variable type is string
- (setq a (menucmd "m=$(+,1,1)"))
- (type a)
- STR
-
- ; Be note that we can not use variables
- ; If needed we have to add the expression itself
- (menucmd "m=$(+,pls02,1)")
- " $(+,??) "
-
- (menucmd "m=$(+,$(+,1,2),1)")
- "4"
-
- $(-,,,...)
- The result of subtracting the numbers through from
- is returned.
- Example:
- (menucmd "m=$(-,1,2)")
- "-1"
-
- (menucmd "m=$(-,2,1)")
- "1"
-
- (menucmd "m=$(-,1,2,3,4,5,6)")
- "-19"
-
- (menucmd "m=$(-,6,3)")
- "3"
-
- (menucmd "m=$(-,6,5,4,3,2,1)")
- "-9"
-
- $(*,,,...)
- The result of multiplying the numbers ,,... is
- returned.
- Example:
- (menucmd "m=$(*,1,2)")
- "2"
-
- (menucmd "m=$(*,2,1)")
- "2"
-
- (menucmd "m=$(*,1,2,3,4,5,6)")
- "720"
-
- (menucmd "m=$(*,6,5,4,3,2,1)")
- "720"
-
-
-
- $(/,,,...)
- The result of dividing the number by ,... is
- returned.
- Example:
- (menucmd "m=$(/,1,2)")
- "0.5"
-
- (menucmd "m=$(/,1,2,3)")
- "0.16666667"
-
- (menucmd "m=$(/,0.5,3)")
- "0.16666667"
-
- (menucmd "m=$(/,0.5,1,2)")
- "0.25"
-
- (menucmd "m=$(/,3,2,1)")
- "1.5"
-
- (menucmd "m=$(/,2,1)")
- "2"
-
- (menucmd "m=$(/,1,2,3,4,5,6)")
- "0.00138889"
-
- (menucmd "m=$(/,6,5,4,3,2,1)")
- "0.5"
-