dos_compilers/Digital Research PLI-86 v1/SAMPLE.PLI

41 lines
1.0 KiB
Plaintext
Raw Normal View History

2024-06-30 21:01:25 +02:00
sample:
procedure options(main);
declare
c character(10) varying,
i fixed binary(15);
do;
put skip list('Input: ');
get list(c);
c = upper(c); /* function reference */
put skip list('Output: ',c);
end;
begin;
declare
c float binary(24);
put skip list('Input: ');
get list(c);
call output(c); /* subroutine invocation */
end;
upper:
procedure(c) returns(character(10) varying);
declare
c character(10) varying;
return(translate(c,'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz'));
end upper;
output:
procedure(c);
declare
c float binary(24);
put skip edit(c) (column(20),e(10,2));
end output;
end sample;