|
gth Beginner
Joined: 17 Oct 2003 Posts: 19 Location: Australia
|
Posted: Fri Jan 04, 2008 8:02 am
#WRITE {6} results in garbage? |
My intention is to use #WRITE to output to files in such a way that won't add CRLF. From the help entry for #FILE it seems as though file numbers 1-5 are text mode and I believe file numbers 6-10 are more binary-like in their I/O operations. However firing this alias -
Code: |
#ALIAS test {#FILE 6 testme.txt;#WRITE {6} {Test};#CLOSE 6} |
...produces this in the output file testme.txt -
Code: |
Testm(@ A@ @m ߈ $ % A~A~ <3Tw|h|4 %@ 8 %@ Ϫ Ϫ@ UJ mUJ "UJ m mL,N ,N |
The file doesn't exist prior to firing the alias; I'm running 7.21 on WinXP with latest patches applied. If this is a known bug or if #WRITE with file number 6 isn't going to work the way I expect, I don't mind using VBScript to write to a file provided vbscript can access the zMUD variables it needs to produce the file output.
Thanks,
G. |
|
|
|
gth Beginner
Joined: 17 Oct 2003 Posts: 19 Location: Australia
|
Posted: Fri Jan 04, 2008 9:31 am |
Okay, from searching around here a bit further, I see files 6-10 are for reading and writing structures (any detailed info on how the latter works??).
Back on topic though: is there a quick sample of writing to a file that won't add the carriage-return and line-feed? (via #MSS if necessary).
Thanks,
G. |
|
_________________ |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Jan 04, 2008 3:45 pm |
See the help for #write for more info on writing into files 6-10. Basically, #write 6 "hello world" 1;#write 6 "hello fang" 10 creates the first and tenth records, which are then read with #read 6 1;#read 6 10.
|
|
|
|
|
|