Just a thought.... Those file "Not open for write" errors are reminiscent of a problem I had while working on a school project back in '92 on Borland Pascal for Dos.
The problem I had was that I was still using the "program progName (input, output)" like the book said rather than "program progName" which works just as well. the (input, output) part is there, in BP at least, for backward compatibility. It is just saying that the standard input device (keyboard) is the input device the program will use and the standard output device (crt) is the output device the program will use. If you change input or output to the name of a file (or is it a file variable? I forget... :-) then that file is treated as standard input/standard output device.
At the time, I was getting groggy on coffee and at around 3 AM two days before I had to had in the project I typed out a filename instead of "input". Needless to say, I went ballistic until a friend with a reasonable set of nerves calmed me down, explained the situation and switched me to decaf....
Antoine
Peter Gerwinski wrote:
According to Kevin A. Foss:
No. Note that for i from 0 to 10 "i div 2" will only equal 0 when i = 0 and when i = 1, otherwise, 2 will go into i at least once.
This is what I get for output: ** ** ** ** **
Huppsa! #-) Thanks, Kevin, for correcting my wrong interpretation.
Peter
-- Peter Gerwinski, Essen, Germany, http://home.pages.de/~Peter.Gerwinski/ Maintainer GNU Pascal - http://home.pages.de/~GNU-Pascal/ - gpc-980420 PGP: see homepage - 6C 94 45 BE 28 A4 96 - 0E CC E9 12 47 25 82 75 Fight the SPAM and UBE! - http://spam.abuse.net/ - http://maps.vix.com/