Welcome to Phrogram Sign in | Join | Help


Bug Report: Inconsistent behaviour (under debugger) of file read and creation

  •  12-20-2006, 5:29 AM

    Bug Report: Inconsistent behaviour (under debugger) of file read and creation

    Hi,

    I'm not sure if I'd be better posting this to the Tech Support forum, but anyway ...

    There's an inconsistency between how Phrogram treats the filename passed to OpenTextFile() and CreateTextFile() -- at least when run using the debugger. The call OpenTextFile("foo.txt") will read a file called My Phrogram Files/foo.txt, but CreateTextFile("foo.txt") will create a file called My Phrogram Files/bin/foo.txt.

    There's a workaround, of sorts, in that OpenTextFile("foo.txt") will also open the file My Phrogram Files/bin/foo.txt -- so provided you move your input files into the bin folder it's consistent.

    My suspicion is that when run under the debugger the working directory for the program is bin, but that there's some "magic" in the OpenTextFile() call that looks in My Phrogram Files in addition to the current working directory. If you're not running under the debugger then you can determine the working directory for the program, so things are easier because you have more explicit control.

    This information may be relevant to anyone thinking of entering December's competition, which requires File IO :-)

    Neil
     

    Filed under: ,
View Complete Thread