Monday, March 2, 2009

The EASY source code is compiled to a binary code and this code then is interpreted at runtime. This ensures that all syntax errors are found already

procedure Main
var nBottles : Integer
var s : String
CgiCloseBuffer
nBottles:=99
s:='s'
while nBottles>=0 do
CgiWriteLn(Str(nBottles)+' bottle'+s+' of beer on the wall,')
CgiWriteLn(Str(nBottles)+' bottle'+s+' of beer,')
if nBottles=0 then
CgiWriteLn('Go to the store, buy some more,')
CgiWriteLn('99 bottles of beer on the wall.')
nBottles--
else
CgiWriteLn('Take one down and pass it around,')
nBottles--
if nBottles=1 then
s:=
else
s:='s'
end
CgiWriteLn(Str(nBottles)+' bottle'+s+' of beer on the wall,')
end
end
endproc

No comments:

Post a Comment