1. interesting bug, possibly useful
- Posted by useless Jul 28, 2010
- 937 views
I stumbled and fell all over this one today. This doesn't error out:
trace(1) writefile = 0 writefile = eu:open("junk","w") puts(writefile,writedata) close(writefile) readfile = eu:open("junk","r") junk = gets(readfile) close(readfile)
Both open()s return 3, there's no error, no crashes, and the gets() from the file(?) are correct valid data, but there's no file written to harddrive.
Praps this is the way to make windows pipes? Just substitute the "TheNameOfYourPipe" for "junk"?
useless
2. Re: interesting bug, possibly useful
- Posted by jimcbrown (admin) Jul 28, 2010
- 891 views
I stumbled and fell all over this one today. This doesn't error out:
trace(1) writefile = 0 writefile = eu:open("junk","w") puts(writefile,writedata) close(writefile) readfile = eu:open("junk","r") junk = gets(readfile) close(readfile)
Both open()s return 3, there's no error, no crashes, and the gets() from the file(?) are correct valid data, but there's no file written to harddrive.
Praps this is the way to make windows pipes? Just substitute the "TheNameOfYourPipe" for "junk"?
useless
There should a file called "junk" written in the current directory of the program.
3. Re: interesting bug, possibly useful
- Posted by jimcbrown (admin) Jul 28, 2010
- 947 views
I stumbled and fell all over this one today. This doesn't error out:
trace(1) writefile = 0 writefile = eu:open("junk","w") puts(writefile,writedata) close(writefile) readfile = eu:open("junk","r") junk = gets(readfile) close(readfile)
Both open()s return 3, there's no error, no crashes, and the gets() from the file(?) are correct valid data, but there's no file written to harddrive.
Praps this is the way to make windows pipes? Just substitute the "TheNameOfYourPipe" for "junk"?
useless
There should a file called "junk" written in the current directory of the program.
Unless you have some other issue (such as the current directory being on a disk that's full or a disk with lots of bad sectors on it, that would cuase the write to fail).
If this is the case, then this behavior is not a bug.
Otherwise, the lack of any file is a pretty serious bug.
4. Re: interesting bug, possibly useful
- Posted by DerekParnell (admin) Jul 28, 2010
- 937 views
I stumbled and fell all over this one today. This doesn't error out:
trace(1) writefile = 0 writefile = eu:open("junk","w") puts(writefile,writedata) close(writefile) readfile = eu:open("junk","r") junk = gets(readfile) close(readfile)
Both open()s return 3, there's no error, no crashes, and the gets() from the file(?) are correct valid data, but there's no file written to harddrive.
Praps this is the way to make windows pipes? Just substitute the "TheNameOfYourPipe" for "junk"?
Kat
Its not 2:00AM over there again is it?
I get lots of errors.
<0074>:: Errors resolving the following references: j.ex (9): readfile j.ex (8): junk j.ex (8): readfile j.ex (7): readfile j.ex (6): writefile j.ex (5): writedata j.ex (5): writefile j.ex (4): writefile j.ex (2): writefile writefile = 0 ^ Press Enter
And even after correcting these, I get a file called "junk" created.