Difference between revisions of "Template:AskPlus E.8.5.0"

From Vital Soft Wiki
Jump to: navigation, search
>Johno
>Johno
Line 10: Line 10:
 
:* New user exit examples:
 
:* New user exit examples:
 
   !mod(17, 3) returns 2
 
   !mod(17, 3) returns 2
   !mod(15, 4) returns 1
+
   !mod(15, 4) returns 3
  
 
   !countval("abc;def;ghi", ";") will return 3
 
   !countval("abc;def;ghi", ";") will return 3

Revision as of 17:09, 16 July 2019

Enhancements:

  • Add new user exits:
  •  !mod(x, y) - Returns the remainder when x is divided by y
  •  !countval(str [, delim]) - Returns the number of values in the string delimited by the delim parm (default delim is comma)
  •  !concat(array [,start,end,step|delim|opt]) - Returns a delimited string with concatenated array elements
If step is negative, the concatenation will happen in reverse order (and start s/b gt end)
By default, the concatenated values are trimmed. Opt can be "notrim", "ltrim" or "rtrim"
  • New user exit examples:
 !mod(17, 3) returns 2
 !mod(15, 4) returns 3
 !countval("abc;def;ghi", ";") will return 3
 !countval("abc,def,ghi,jkl") will return 4
 newreg x:10I1 = !index(@)
 !concat(x, "7,,-2|\|") returns "7|5|3|1"

Fixes:

  • Eliminate a possible overflow using !compress.
  • Fix a bug using sub-item syntax that extends over an array.