1 |
the status quo: |
2 |
=============== |
3 |
|
4 |
notations: |
5 |
UPPERCASE letters are verbatim |
6 |
a,b,x string literals |
7 |
c,d,e single characters |
8 |
f,g,h formats producing a single string value |
9 |
i,j,k,l,m,n,o numbers (formats processed in integer context) |
10 |
ll list of numbers (pushed by an expression) |
11 |
|
12 |
|
13 |
* mode |
14 |
Mcd c = P, H or D, d = U or L |
15 |
P proof mode: no changes applied |
16 |
H heading mode: |
17 |
^x is replaced as ';' for x=a, ',' for x=b..i, '.' for others |
18 |
angle brackets are removed (>< replaced by '; '): |
19 |
<a=b> gives b in index, a else |
20 |
<a> gives nothing in index, a else |
21 |
D data mode: like heading mode plus '. ' after each field not followed |
22 |
by a suffix. no '.', if field ends in "punctuation" character. |
23 |
L lower case: no changes applied |
24 |
U upper case: characters are converted to "uppercase" as listed |
25 |
in the file ISISUC.TAB |
26 |
|
27 |
* field selector s |
28 |
Vn^c[i..j] |
29 |
Vn[i..j]^c select field n (0 = all), optional subfield c (* = first), |
30 |
optional range of occ i to j (j may be ommited or LAST), |
31 |
Dn^c select presence (optionally of subfield c) |
32 |
Nn^c select absence (optionally of subfield c) |
33 |
NOCC(s) total number of occurences of field s (NUMERIC) |
34 |
P(s) true, if s is present (BOOLEAN, see IF) |
35 |
A(s) true, if s is absent (BOOLEAN, see IF) |
36 |
["x" a ["x" a ...]][|x|[+]]s[*o][.l][(k[,m])][[+]|x|]["x"] |
37 |
here [] are not literal, but indicate optional parts. |
38 |
x are strings not containing their respective delimiter |
39 |
a arbitrary formatting or mode commands conditionally executed |
40 |
repeated prefix or suffix in || output for any repetition, |
41 |
with + first prefix / last suffix is ommited, |
42 |
optional string offset o (0=start) and length l, |
43 |
optional indentation k,m (see formatting) |
44 |
|
45 |
* structural elements |
46 |
they do not themselves generate output, |
47 |
but rather control execution of formats u,v,w |
48 |
, separator (end some construct) |
49 |
/*...*/ comment |
50 |
'a' unconditional literal |
51 |
@a, include format file a |
52 |
&a(f) call external function a |
53 |
(u) repeat group (over IOCC, only in record or string mode) |
54 |
BREAK break a repeat group or REF |
55 |
CONTINUE continue a repeat group |
56 |
SELECT f CASE g: u CASE h: v ... ENDSEL |
57 |
SELECT f CASE g: u CASE h: v ... ELSECASE w ENDSEL |
58 |
REF(m,u) apply format to row number m |
59 |
REF->a(ll,u) |
60 |
REF([f]ll,u) apply format to row number m in db |
61 |
En:=m assignment to numerical variable |
62 |
Sn:=(f) assignment to string variable |
63 |
IF t THEN u FI |
64 |
IF t THEN u ELSE v FI |
65 |
WHILE t (u) |
66 |
t a boolean expression using: |
67 |
fxg comparision, where x is one of = <> < <= > >= |
68 |
AND NOT OR () logical combination |
69 |
f:g true iff f contains g case insensitiv |
70 |
P(s) A(s) (see field selector) |
71 |
f format not empty |
72 |
|
73 |
* calculation (NUMERIC) |
74 |
calculation is performed on longs until a decimal point is seen |
75 |
or RAVR is used. |
76 |
statistical functions run over format giving a list of numbers, |
77 |
separated by ; or blank or any other non-numerical characters |
78 |
+-*/() arithmetic |
79 |
123 integer literal |
80 |
123.45 float literal |
81 |
VAL(f) numeric value of string |
82 |
RMAX(ll) maximum |
83 |
RMIN(ll) minimum |
84 |
RSUM(ll) sum |
85 |
RAVR(ll) average (always float) |
86 |
En numerical variable n |
87 |
|
88 |
* database functions |
89 |
OCC |
90 |
IOCC current occurence (1..) in repeat |
91 |
MFN current mfn (with 6 digits) (NUMERIC) |
92 |
MFN(n) current mfn (with n digits) |
93 |
DB |
94 |
MSTNAME current masterfile (possibly changed by REF) |
95 |
L(f) mfn of 1st posting for key f (NUMERIC) |
96 |
L->a(f) |
97 |
L([g]f) mfn of 1st posting for key f in db (NUMERIC) |
98 |
LR((f)) |
99 |
LR((f),m,n) list of mfns (postings m through n) |
100 |
NPOST(f) |
101 |
NPST(f) |
102 |
NPOST([g]f) number of postings for f (in db) (NUMERIC) |
103 |
|
104 |
* system functions |
105 |
CAT(f) contents of file f |
106 |
DATE date as yyyymmdd hhmmss w nnn (w day of week, nnn julian) |
107 |
DATE(DATETIME) dd/mm/yy hh:mm:ss |
108 |
DATE(DATEONLY) dd/mm/yy |
109 |
DATE(n) mm-dd-yy (n=2), hh:mm:ss (n=3) or both (n=1) |
110 |
GETENV(f) value of env variable f |
111 |
PUTENV(f) read f as x=y, set env var x to y |
112 |
SYSTEM(f) execute system command |
113 |
|
114 |
* string functions |
115 |
LEFT(f,n) substring (first n chars of f) |
116 |
RIGHT(f,n) substring (last n chars of f) |
117 |
SS(n,m,f) |
118 |
MID(f,n,m) substring (m chars starting at n) |
119 |
REPLACE(f,g,h) replace g in f with h |
120 |
F(f) |
121 |
F(f,n) |
122 |
F(f,n,m) number to string |
123 |
S(f)*n.m stringify format f, apply optional offset n, length m |
124 |
INSTR(f,g) pos of g in f (0 = none) (NUMERIC) |
125 |
SIZE(f) length of string f (NUMERIC) |
126 |
TYPE(f) A (if alphabetic), N (if numeric) or X (else) |
127 |
TYPE(?a?,f) 0 or 1, if f matches pattern .... ???? |
128 |
TYPE(n,f) 0 or 1, if f is alphanumeric (n=1), alpha(n=2), digits(n=3), |
129 |
integer, incl. sign(n=4), number, incl. E-notation(n=5) |
130 |
Sn string variable n |
131 |
|
132 |
|
133 |
* changing records |
134 |
PROC(f) apply changes resulting from f: |
135 |
D* delete all fields |
136 |
Dn delete all fields n |
137 |
Dn/m delete occ m of field n |
138 |
Ancac add string a (delim by any c) as new field n |
139 |
Hn m a add string a of length m as new field n |
140 |
|
141 |
* formatting |
142 |
# newline unconditional |
143 |
/ newline if not on line start |
144 |
% reset blank lines |
145 |
{ |
146 |
} open/close formatting scope |
147 |
Vn..(m) or Vn..(m,o) indentation in columns for one field selector |
148 |
NEWLINE(f) change newline to emit f (\r,\n are recognized in f) |
149 |
Cm mv to column m |
150 |
Xm m blanks |
151 |
M(n) |
152 |
M(n,m) indentation in twips (twentieth point = 1/1440 inch) |
153 |
TAB mv to some (?) position |
154 |
TAB(m) mv to position in twips |
155 |
LW(n) linewidth |
156 |
QC center |
157 |
QJ justify |
158 |
BOX |
159 |
BOX(n) box (with color n) |
160 |
NP |
161 |
NP(n) newpage (if less than n lines left) |
162 |
NC |
163 |
NC(n) new column (if less than n lines left) |
164 |
FONTS((a,b),...) setup fonts table, each font with family a and name b |
165 |
COLS((i,j,k),...) setup color table, each color with RGB-values i,j,k |
166 |
Fn select font n |
167 |
FSn select fontsize n |
168 |
B bold |
169 |
I italic |
170 |
UL underline |
171 |
CLn select color n |
172 |
!cac print ESC a |
173 |
PICT(f) picture |
174 |
BPICT(f) background picture |
175 |
BPICT((f),m) background picture in mode m |
176 |
LINK((f),g,...) link text f to command g, where g is: |
177 |
|
178 |
* link commands |
179 |
TEXTBOX f open box with text f |
180 |
TEXTBOXCHILD f same, as child of DB window |
181 |
TEXTBOXRCHILD f same, as child of record window |
182 |
TEXTBOX[[R]CHILD]LOAD f[,a,b] display format f, optionally changing a to b |
183 |
TEXTBOX[[R]CHILD]IMG f display img file f |
184 |
TEXTBOX[i]... with literal [] identify window number i |
185 |
OPENFILE f open according to filetype |
186 |
CMD f run external prog f |
187 |
GOTO m display record with mfn m |
188 |
LGOTO f display record with key f |
189 |
GOBACK ... :) |
190 |
FORMAT f[,a,b] switch format to f, optionally changing a to b |
191 |
BROWSE a[,m[,f]] browse DB a, mfn m, format f |
192 |
\,{ and } "must be escaped with a \" (???) |