beardeddragon5
released this
12 Apr 08:41
·
7 commits
to master
since this release
Input
To input data in pla18 you can use the command line arguments.
runtime sum.tst 10 10 10 10
To access the arguments:
var sum: int;
begin
sum := 0;
argIdx := 0;
while argIdx < argCount do
begin
call arg;
sum := sum + argOut;
argIdx := argIdx + 1
end;
cint := sum
end$
build-in for input:
- argIdx: setting the current index you want to query
- arg: procedure setting argOut to the argument at index argIdx
- argOut: the value of the argument
Output
Output to console there are 3 variables to can set and will result in outputting it to console.
build-in vars for output:
- ascii: output int als ascii char
- cint: output int to console
- creal: output real to console