Hello, Last week I could not make it to the Lab to do my homework. It is due tomorrow and I thought I would write it in Xcode since I have the Pascal stuff installed. Then tomorrow take in a jump drive and transfer it to their computers and print it out and turn it in. In class we read in a text file that the instructor gives us. I am trying to recreate it on my machine but it can't find the file? Then tomorrow I will redirect it to find the instructors file to process the correct numbers.
I created a simple text file called num.rtf and placed it in the root directory thinking it would start to look for the file there. It is not seeing it. Any ideas would would be great.
In short where does pascal in xCode start looking for text files to read in?
Thanks
-Lars
Code:
program readfile;
uses
EmptyPlaceHolderUnit;
var
f : text;
number : integer;
begin
assign(f,'num.rtf');
reset(f);
while NOT EOF(f) do
readln(f, number);
writeln('The item was: ', number);
end.
I created a simple text file called num.rtf and placed it in the root directory thinking it would start to look for the file there. It is not seeing it. Any ideas would would be great.
In short where does pascal in xCode start looking for text files to read in?
Thanks
-Lars