[Gambas-user] BUG in using WRITE #hFILE
njmurphy1 at ...734...
njmurphy1 at ...734...
Sat Feb 12 19:09:29 CET 2005
Hi All
I am getting my feet wet with Gambas. I have a Database of stuff that is in
html form. I wanted to sort this stuff into a different order. I got all
this done but when I write it back to a file I have trash, either 2
characters or 4, before the file that I am writing. Here is an example of the
code that causes the problem:
DIM output_file as FILE
DIM page_str as STRING
page_str = <extract data and put in this var>
OPEN "/path/to/file" FOR WRITE CREATE AS #output_file
WRITE #output_file, page_str
CLOSE #output_file
this code produces a file that has 2 or 4 characters of trash before the file.
I have checked and the trash characters do not exists, checking with watch
variable or writing to a textbox, before the WRITE statement. But if I use
PRINT instead of WRITE it works just fine. Like this:
OPEN "/path/to/file" FOR WRITE CREATE AS #output_file
PRINT #output_file, page_str
CLOSE #output_file
I think this is a bug in Gambas. Or am I missing something?
Here is a list of the trash that is at the beginning of the files, if it will
help. It's not in any order.
a0 62 00 c0
dc 84
7a 7f 00 c0
f1 84
0f 96
4a ad
52 95
1f b7
26 8a 00 c0
3e 7c 00 c0
c5 99
6e a5
TIA
Joseph
More information about the User
mailing list