home *** CD-ROM | disk | FTP | other *** search
- { Pascal source code - udf procedure }
- { Copyright (c) 1988 Nantucket Corp. }
- Module ClipPas;
-
- const
- UNDEF = 0;
- CHARACTER = 1;
- NUMERIC = 2;
- LOGICAL = 4;
- DATE = 8;
- MPTR = 32; { or'ed with type when passed by reference }
- MEMO = 65;
- NEWLINE = chr(13);
- ENDSTR = chr(0);
-
- type
- datestr = packed array [1..8] of char;
- charstr = packed array [1..7] of char;
- adsdate = ads of datestr;
- adschar = ads of charstr;
-
- function _parc : adschar [c,varying]; extern;
- function _parinfa : integer [c,varying]; extern;
- function _parni : integer [c,varying]; extern;
- function _pards : adsdate [c,varying]; extern;
- procedure _retc [c,varying]; extern;
-
- procedure ArrFunc(vars i,j,k : integer);
- { One char parameter is received by far reference. }
- { Far reference is specified with the VARS keyword. }
- var
- x, y : integer;
- str1 : adschar;
- begin
- for x := 1 to _parinfa(1, 0) do
- begin {string variables }
- { string variables }
- if (_parinfa(1, x) = CHARACTER) then
- begin
- writeln(output, _parc(1, x)^);
- _retc((_parc(1,x)));
- end;
-
- { integer or floating point }
- if (_parinfa(1, x) = NUMERIC) then
- WriteLn(output, _parni(1, x):-3)
- else
- { dates }
- if (_parinfa(1, x) = DATE) then
- WriteLn(output, _pards(1, x)^);
- end;
- end;
- end.