Datasheet

Release Notes - New Features included in Release 2.4.0
Page 63 of 89
check=checkstring switch
This does a format check on the input characters and sets w.$checkfail to 1 if it fails.
Checkstring may contain:
a leading number
L – ignore and drop leading spaces
T – ignore and drop trailing spaces
N – field must consist of numeric characters only. If the leading number is supplied, then the
field must consist of that number of numeric characters
F – the field must consist of floating-point characters only (e.g. 3.4)
e.g. check=6NLT
f. “display” verb now allows:
nonl switch (no newline is added to the display – equivalent to COBOL “with no advancing”)
g. “set” and “display” verbs now allow:
ref=reformat-command – to reformat the string.
the reformat-command is in c-language syntax
e.g. to reformat a field to be 6 numerics, with leading zeros:
set w.wordno=w.wordno ref=%.6d – will reformat ‘123’ to ‘000123’
also available (but possibly less useful) – reformat with decimal places:
set w.wordno=w.wordno ref=%10.4f - will reformat e.g. 1234 to 1234.0000
also available – character string reformatting e.g. %6.6s
There is currently a limit of 6 characters on the reformat string directive.
h. Non-printing characters (or any characters)
may now be referenced by their decimal ASCII value as w.$ascnnn, e.g:
set w.esc=w.$asc27
display w.$asc65””w.$asc066
i. Reference modification start and length values may now be datanames.
e.g.
set w.start=4
set w.len=6
display w.desc[w.start:w.len]
display w.desc[4:w.len]
display w.desc[w.start:1]
j. The new verb ‘let’ is now allowed as a synonym for ‘set’.
e.g.
let w.start=4
k. It is now possible to have a reference modified subject of a set verb.
e.g.
set w.field1=“abcdef”
set w.field1[3:2]=“gh”
results in the field value: “abghef”