added simple examples

main
Sandy Brownlee 2 years ago
parent afc2b3e760
commit e5730fe8a2
  1. 9
      programs/assignments.tri
  2. 9
      programs/ifdemo.tri
  3. 10
      programs/simpleadding.tri

@ -0,0 +1,9 @@
let
var n : Integer;
var c : Char
in
begin
c := '&';
n := n + 1
end

@ -0,0 +1,9 @@
let
var a : Integer;
var n : Integer
in
begin
if a < 0
then n := 0
else n := 1
end

@ -0,0 +1,10 @@
let
var a : Integer;
var b : Integer;
var c : Integer
in
begin
a := 1; b := 2; c := a / b;
end