question writting text to a file. 
Author Message
 question writting text to a file.

hi, my question is, how do i write a text to a file without the quotation
mark (") in
the front and end of a line when using write command????
eg.
i want my line looks like this.
This is test

not this
"This is test"

thanks a lot!!



Tue, 11 May 2004 15:31:11 GMT  
 question writting text to a file.
hi, my question is, how do i write a text to a file without the quotation
mark (") in
the front and end of a line when using write command????
eg.
i want my line looks like this.
This is test

not this
"This is test"

thanks a lot!!



Tue, 11 May 2004 15:31:11 GMT  
 question writting text to a file.

Quote:

> hi, my question is, how do i write a text to a file without the quotation
> mark (") in
> the front and end of a line when using write command????
> eg.
> i want my line looks like this.
> This is test

> not this
> "This is test"

Use Print instead?

--
Joe Foster <mailto:jlfoster%40znet.com>   Space Cooties! <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Tue, 11 May 2004 16:10:44 GMT  
 question writting text to a file.
Use PrinrOn Fri, 23 Nov 2001 15:31:11 +0800, "-=Lucky~^.^"

Quote:

>hi, my question is, how do i write a text to a file without the quotation
>mark (") in
>the front and end of a line when using write command????
>eg.
>i want my line looks like this.
>This is test

>not this
>"This is test"

>thanks a lot!!

Use Print instead of Write


Tue, 11 May 2004 16:20:27 GMT  
 question writting text to a file.
Use the Print# instead of the Write# statement to place your text into the file.

Rick

Quote:

> hi, my question is, how do i write a text to a file without the quotation
> mark (") in
> the front and end of a line when using write command????
> eg.
> i want my line looks like this.
> This is test

> not this
> "This is test"

> thanks a lot!!

______________________________________________________________________________
Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.binaries.net


Wed, 12 May 2004 00:22:16 GMT  
 question writting text to a file.
use print instead of write (or was it other way round?). Binary files are
better through. You get better control and can be sure the files will not be
edited by every person who wants to get to the top of the high score table
:-)


Quote:
> hi, my question is, how do i write a text to a file without the quotation
> mark (") in
> the front and end of a line when using write command????
> eg.
> i want my line looks like this.
> This is test

> not this
> "This is test"

> thanks a lot!!



Wed, 12 May 2004 23:27:27 GMT  
 question writting text to a file.


Quote:
>use print instead of write (or was it other way round?). Binary files are
>better through. You get better control and can be sure the files will not be
>edited by every person who wants to get to the top of the high score table
>:-)

And how do you write to binary files ?

Bart



Thu, 13 May 2004 17:27:37 GMT  
 question writting text to a file.
Type in 'Open' and press F1

Binary file access is a method of reading and/or writing to any
position in the file.

There is not really such a thing as a 'Binary File' - or rather ALL
files are actually Binary - some files happen to also be what people
call 'Text Files'.

'Binary file access' is what you can *do* to a file - it has nothing
to do with what is *in* the file.



Quote:


>>use print instead of write (or was it other way round?). Binary files are
>>better through. You get better control and can be sure the files will not be
>>edited by every person who wants to get to the top of the high score table
>>:-)

>And how do you write to binary files ?

>Bart



Thu, 13 May 2004 20:08:41 GMT  
 question writting text to a file.


Quote:
> Type in 'Open' and press F1

> Binary file access is a method of reading and/or writing to any
> position in the file.

> There is not really such a thing as a 'Binary File' - or rather ALL
> files are actually Binary - some files happen to also be what people
> call 'Text Files'.

A text file uses the ascii characters 0 to 127, and nothing higher, so bit 7
is always 0. A binary files uses all 256 ascii characters includeing bit 7.
You only have to worry about that when you are doing FTP through. Technicly
all text files are binary, but binary files arn't all text.

Quote:

> 'Binary file access' is what you can *do* to a file - it has nothing
> to do with what is *in* the file.

Makes better use of space, prevents cheating with text editor. Anyone who
can figure out a format and edit it with a hex editor deserves the right to
cheat :-)

Quote:





> >>use print instead of write (or was it other way round?). Binary files
are
> >>better through. You get better control and can be sure the files will
not be
> >>edited by every person who wants to get to the top of the high score
table
> >>:-)

> >And how do you write to binary files ?

> >Bart



Fri, 14 May 2004 05:13:35 GMT  
 question writting text to a file.


Quote:
>Type in 'Open' and press F1

>Binary file access is a method of reading and/or writing to any
>position in the file.

>There is not really such a thing as a 'Binary File' - or rather ALL
>files are actually Binary - some files happen to also be what people
>call 'Text Files'.

>'Binary file access' is what you can *do* to a file - it has nothing
>to do with what is *in* the file.

So tell me, where do I type Open and press F1 ??
And do I just open, append to a file I call *.exe then ? or what ?
Very interested, but I don't understand a lot of what you are saying,
I'm a newbie in VB6 (and any other programming language actually ;-)

Bart



Sat, 15 May 2004 01:39:33 GMT  
 question writting text to a file.
Bart :

Open "TESTFILE" For Binary Access Write As #1
    ' Close before reopening in another mode.
Close #1

If you will go into the VB code window (where you type
in the code that runs your project, type the word OPEN ...
place your cursor ( the | symbol) in the middle of the
word (  OP | EN ) and then press your F1 key ...
the VB Help section will open up and display the
help information for how to OPEN files in different
modes.

HTH,

Jim



Sat, 15 May 2004 04:51:22 GMT  
 question writting text to a file.


Quote:



>> Type in 'Open' and press F1

>> Binary file access is a method of reading and/or writing to any
>> position in the file.

>> There is not really such a thing as a 'Binary File' - or rather ALL
>> files are actually Binary - some files happen to also be what people
>> call 'Text Files'.

>A text file uses the ascii characters 0 to 127, and nothing higher, so bit 7
>is always 0. A binary files uses all 256 ascii characters includeing bit 7.
>You only have to worry about that when you are doing FTP through. Technicly
>all text files are binary, but binary files arn't all text.

0 to 127 - ever heard of the British Pound symbol ?
Quote:

>> 'Binary file access' is what you can *do* to a file - it has nothing
>> to do with what is *in* the file.

>Makes better use of space, prevents cheating with text editor. Anyone who
>can figure out a format and edit it with a hex editor deserves the right to
>cheat :-)

Space is cheap.

Personally I would not use a Hex editor - just a Byte editor

- Show quoted text -

Quote:





>> >>use print instead of write (or was it other way round?). Binary files
>are
>> >>better through. You get better control and can be sure the files will
>not be
>> >>edited by every person who wants to get to the top of the high score
>table
>> >>:-)

>> >And how do you write to binary files ?

>> >Bart



Sat, 15 May 2004 07:22:05 GMT  
 question writting text to a file.


Quote:
>Bart :

>Open "TESTFILE" For Binary Access Write As #1
>    ' Close before reopening in another mode.
>Close #1

>If you will go into the VB code window (where you type
>in the code that runs your project, type the word OPEN ...
>place your cursor ( the | symbol) in the middle of the
>word (  OP | EN ) and then press your F1 key ...
>the VB Help section will open up and display the
>help information for how to OPEN files in different
>modes.

Okay, I got it. I didn't knew that trick with F1. Thank you very much
Jim !

Bart



Sat, 15 May 2004 15:00:12 GMT  
 
 [ 13 post ] 

 Relevant Pages 

1. Writting record in text file

2. Writting a text file

3. Writting text into PictureBox

4. writting exe-files in vbs...

5. Reading from and writting to binary files

6. Writting wherever you want in a file

7. Writting a big HTML file cause error

8. Saving and writting to Files

9. writting single bytes to a binary file

10. Writting to an INI file.

11. Reading & Writting INI Files

12. Saving and writting to Files

 

 
Powered by phpBB® Forum Software