Southperry.net
Turbo pascal help: - Printable Version

+- Southperry.net (https://www.southperry.net)
+-- Forum: Social (https://www.southperry.net/forumdisplay.php?fid=14)
+--- Forum: The Speakeasy (https://www.southperry.net/forumdisplay.php?fid=54)
+--- Thread: Turbo pascal help: (/showthread.php?tid=4527)



Turbo pascal help: - Horusmaster - 2008-10-23

what's wrong here?

assign (inputfile,'data.txt');
reset (inputfile);


everytime i run this, it says error, file not found, although i have that file there.
the file is of the exactly same name, i checked it a billion times, and I made sure that the directory is correct, it's in the same directory as the program, and i even used chagedir, to make sure it's in the same directory.

why can't pascal find the fuucking stupid file?

I"M SO FUUCKING PISSED!!!!!!!!!!!!!


Turbo pascal help: - Fiel - 2008-10-23

Did you declare the variable "inputfile" before you assigned it?

http://www.learn-programming.za.net/programming_pascal_learn11.html


Turbo pascal help: - Horusmaster - 2008-10-23

yes, i declared it as file of text at the beginning.

I could have sworn this worked last year when I learned turbo pascal.

This year we are learning java, and there's this computer contest today, and it's so easy, except i can't do read/write from file in java and I wrote the whole contest in pascal, and i screwed up cause somehow it can't read/write from file.

but luckily i switched to turing in the end and got 2/5 questions right, i ran out of time.