Something still isn't right, this is what I have
Program Lesson9_Program(input, output);
Type
Str25 = String[25];
tEquation = Record
num : Str25;
add,subtract,multiply,divide : Str25;
end;
Var file1 : Text;
eq1 : String[255];
eq2 : string[255];
myEquation : tEquation;
myeqArray : array[1..50] of tEquation;
Begin
Assign(file1,'input.txt');
Reset(file1);
If (IOResult <> 0) then
Begin
Writeln('The file required to be opened is not found!');
Readln;
End Else
Begin
readln(file1, eq1);
Writeln('The first line of the file reads: ',eq1);
readln(file1, eq2);
writeln('The second line of the file reads: ',eq2);
End;
end.
Do I have an error somewhere in my record or Array? I can't seem to get my equation into an array. Sorry I am new to programming.
Last edited by Gotovina7 : Nov 17th, 2007 at 6:43 pm.