home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1995
/
ARCHIVE95.iso
/
discs
/
pipeline
/
6_10
/
CustomChck
/
c_o
next >
Wrap
Text File
|
1993-05-05
|
3KB
|
99 lines
%OP%VS4.13 (28-Apr-92), Andrew Murray, R4001 0002 6668 8337
%OP%DEf
%OP%TNN
%OP%PL0
%OP%HM0
%OP%FM0
%OP%BM0
%OP%LM10
%OP%PT1
%OP%PDDotMatrix
%OP%WC590,1072,464,768,0,5,0,0
%OP%NDo_switch,1
%CO:A,12,89% Example of use of monitor functions
%V%%L%function("example","dat:date","num:number","ref:reference",%LF%"txt:text","any","shortarray:array","longarray:array")
%V%%L%o("example",join(s(@dat),s(@num),s(@ref),s(@txt),%LF%s(@any),s(@shortarray),a(@longarray)))
%V%%L%result(if(@num>4,"OK",%LF%example(@dat+@num,%LF%set_value(@ref,@num)+1,@ref,%LF%join(@txt,char(code("a")+@num)),%LF%oindex(@longarray,1,mod(@num,3)+1),%LF%{@txt,@dat},{@dat;@num;@txt})))
Display function and parameters
%V%%L%function("o","f:text","s:text")
Use dialogue box
%V%%L%result(if(o_switch,o_set(alert(join(@f,"(",o_clip(@s),")"),"Supress","OK")-1),))
Use document [o]
result(if(o_switch,o_slot([o]all,o_set(o_switch+1),%LF%join(@f,"(",o_clip(@s),")")),))
Format parameter to string, identifying its type by one character
%V%%L%function("s","v")
%V%%L%result(if(o_switch,o_s(@v,left(type(@v),1)),))
Identify array by its first element
%V%%L%function("a","v:array")
%V%%L%result(if(o_switch,join("{",o_clip(s(index(@v,1,1))),"}, "),))
Display index: array, col, row and (if valid), slot content
%V%%L%function("oindex","from:array","c:number","r:number")
%V%%L%o("oindex",join(a(@from),s(@c),s(@r),s(o_i(@from,@c,@r))))
%V%%L%result(index(@from,@c,@r))
Set switch/count
%V%%L%function("o_set","v:number")
%V%%L%result(set_name("o_switch",@v))
Build line of text
%V%%L%function("o_s","v","t:text")
%V%%L%result(join(@t,":",if(@t="t",@v,if(@t="n",string(@v,2),%LF%if(@t="d",o_datestring(@v),"??"))),", "))
Extract value, return null if index is invalid
%V%%L%function("o_i","from:array","c:number","r:number")
%V%%L%result(if(@r>rows(@from)|@c>cols(@from)|@c=0|@r=0,"",index(@from,@c,@r)))
Set value in slot
%V%%L%function("o_out","r:reference","v")
%V%%L%result(set_value(@r,@v))
%V%%L%function("o_slot","to:array","os:number","s:text")
%V%%L%result(o_out(index(@to,1,mod(@os-2,rows(@to))+1),join(string(@os-1,0)," ",@s)))
Remove last two characters
%V%%L%function("o_clip","s:text")
%V%%L%result(left(@s,length(@s)-2))
Create display string from date
%V%%L%function("o_datestring","v:date")
%V%%L%result(join(string(day(@v),0),%LF%choose(month(@v)," Jan "," Feb "," Mar "," Apr "," May ",%LF%" Jun "," Jul "," Aug "," Sep "," Oct "," Nov "," Dec "),%LF%string(year(@v),0)))
%CO:B,12,0%%CO:C,12,0%%CO:D,12,0%%CO:E,12,0%%CO:F,12,0%%CO:G,12,0%%CO:H,12,0%%CO:I,12,0%%CO:J,12,0%%CO:K,12,0%%CO:L,12,0%%CO:M,12,0%%CO:N,12,0%%CO:O,12,0%%CO:P,12,0%%CO:Q,12,0%%CO:R,12,0%%CO:S,12,0%%CO:T,12,0%%CO:U,12,0%%CO:V,12,0%%CO:W,12,0%%CO:X,12,0%%CO:Y,12,0%%CO:Z,12,0%