why doesnt this pascal program work?

Status
Not open for further replies.

shiftyape

Honorable
Feb 23, 2013
268
0
10,780
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.
 
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.
 
Status
Not open for further replies.