Skip to content

Releases: beardeddragon5/PLA18

Interpreter 1.0 for PLA18

12 Apr 08:41
Compare
Choose a tag to compare

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

Template of PLA18 like from Exercise

09 Apr 19:46
Compare
Choose a tag to compare
Pre-release

An remastered of the template given for this exercise.

Updated Base Version

31 Mar 15:24
Compare
Choose a tag to compare
Updated Base Version Pre-release
Pre-release

Base version of the compiler with some formating and a option based cli interface.

Fixed a bug in 60d61a4

Bug resulting in the missing ability to read from the input file.