cao@bucsf.BU.EDU (chan cao) (09/30/90)
hi,
I'm curious why the following program always give me error at the end.
Even if i have a period after end, that doesn't solve the problem.
i used pascal compiler called pascal-2 in unix.
thanks for any suggestions.
program test (input,output);
var
i,j,k:integer;
begin
for i:=1 to 200 do
writeln ('something');
end.bucsf%
bucsf% pc pas.p -main -berkeley
Pascal-2 4.00 (r0) Encore UMAX4.2 30-Sep-90 4:44 AM Page 1-1
pas.p
7 end
^9
*** 9: Use '.' after main program body
*** There was 1 line with errors detected ***
?Errors detected: 1kamal@wpi.WPI.EDU (Kamal Z Zamli) (10/02/90)
In article <65252@bu.edu.bu.edu> cao@bucsf.UUCP (chan cao) writes: >hi, >I'm curious why the following program always give me error at the end. >Even if i have a period after end, that doesn't solve the problem. >i used pascal compiler called pascal-2 in unix. >thanks for any suggestions. > >program test (input,output); >var > i,j,k:integer; >begin > for i:=1 to 200 do > writeln ('something'); >end.bucsf% >bucsf% pc pas.p -main -berkeley >Pascal-2 4.00 (r0) Encore UMAX4.2 30-Sep-90 4:44 AM Page 1-1 >pas.p > > 7 end > ^9 >*** 9: Use '.' after main program body > > > *** There was 1 line with errors detected *** >?Errors detected: 1 Did you put a carriage return after the "end ." statement ? I dont't know why but i think you do need it ...
soper@maxzilla.encore.com (Pete Soper) (10/02/90)
From article <1990Oct1.193803.5225@wpi.WPI.EDU>, by kamal@wpi.WPI.EDU (Kamal Z Zamli): (trivial program omitted) >>Pascal-2 4.00 (r0) Encore UMAX4.2 30-Sep-90 4:44 AM Page 1-1 >>pas.p >> >> 7 end >> ^9 >>*** 9: Use '.' after main program body > > Did you put a carriage return after the "end ." statement ? > I dont't know why but i think you do need it ... Yes, this is the problem. The original poster's text editor must somehow have left off the final newline in the source file. Sorry I didn't respond to this sooner. After skipping over thousands of Turbo Pascal postings my eyes must have glazed over. (No offense to TP intended!) ----------------------------------------------------------------------- Pete Soper (soper@encore.com) +1 919 481 3730 Encore Computer Corp, 901 Kildaire Farm Rd, bldg D, Cary, NC 27511 USA