You should report the exact error messages, on order to get help.
I tried to compile it with Free Pascal Compiler, getting:
filetext.pas(12,13) Error: Incompatible types: got "Char" expected "Int64"
filetext.pas(19,10) Error: Illegal qualifier
filetext.pas(20,9) Error: Illegal qualifier
filetext.pas(24,1) Fatal: Syntax error, "BEGIN" expected but "identifier THENUM" found
First error reports a
type mismatch: you cannot compare integers to characters:
Quote:
until (a[i]=' ');
You could fix it, for instance this way (if it makes sense to you)
until (a[i]=-1);
Second (and third) error occurs because you are using an integer like an array.
Quote:
read(f,j[i]);
Write(j[i]);
You cannot subscript a integer variable (an array is required).
Fourth error:
BEGIN
is required: you forgot to put
BEGIN
immediately below the
Quote:
Procedure theprogram;
line.