why doesnt this pascal program work?

shiftyape

Honorable
Feb 23, 2013
48
0
10,580
0
program Project1;

{$mode objfpc}{$H+}

uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes
{ you can add units after this };
var
num1:integer;

begin
writeln('stuff');
readln(num1);
if num1 > 5 then
begin
Exit;
end;
else begin
writeln('stuff');
readln;
end;
end.
 

ex_bubblehead

Distinguished
Moderator
What specifically doesn't work?

You need to post more than just a source listing with "Why doesn't this work?".

Does this code compile without errors?
If not, what errors are generated?

Does code this run without errors?
If not, what errors are generated?

Does this code generate the expected results?
If not, what were the expected results, and what were the actual results?



You should also use the full editor, and enclose your source in code blocks to preserve formatting. Unformatted source is extremely hard to read.
 
Thread starter Similar threads Forum Replies Date
aymen9309 Apps General Discussion 1
Zugoldragon Apps General Discussion 2
I Apps General Discussion 1
S Apps General Discussion 3
A Apps General Discussion 13
E Apps General Discussion 1
U Apps General Discussion 4
A Apps General Discussion 2
N Apps General Discussion 11
W Apps General Discussion 2
M Apps General Discussion 5
T Apps General Discussion 17
S Apps General Discussion 1
tarnjotsingh Apps General Discussion 1
A Apps General Discussion 4
dovedescent7 Apps General Discussion 3
Y Apps General Discussion 1
C Apps General Discussion 2
H Apps General Discussion 1
G Apps General Discussion 1

ASK THE COMMUNITY