| View previous topic :: View next topic |
| Author |
Message |
faughnj3 Newbie
Joined: 14 Apr 2004 Posts: 4
|
Posted: Apr 15th, 2004 08:42 AM Post subject: output file |
|
|
does anyone know how to create a new txt file, and have the contents of a 2d array printed to that file, and have the file saved to the c: or desktop
any help would be brilliant
thanks
sorry for posting so soon again its just that im really stuck |
|
| Back to top |
|
Gilad_r Centurion
Joined: 03 Mar 2004 Posts: 156
|
Posted: Apr 15th, 2004 08:55 AM Post subject: |
|
|
when you use the 'Open' statement and the file specified doesn't exist, it is created.
you can then use 'Put' to insert text to the file. _________________ "you should make amends with you" (Incubus) |
|
| Back to top |
|
Andir Centurion

Joined: 21 Dec 2003 Posts: 184 Location: Chicago Area
|
Posted: Apr 15th, 2004 09:29 AM Post subject: |
|
|
| Gilad_r wrote: | | you can then use 'Put' to insert text to the file. |
When using Put, your inserting raw data. It's a little different than text. It's good for arrays and user defined "Type" variables because you don't have to worry about carriage returns, line feeds, commas or anything else like that. It also provides some low level data security in that all data "put" to a file is in Binary. And not readable by the average "file browser" (like myself ) without a prior knowledge of the file structure (record sizes, data types...) _________________ If you happen to see little people sitting on your desk...don't tell anyone or they might think your crazy too. |
|
| Back to top |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Apr 17th, 2004 08:49 AM Post subject: |
|
|
| Gilad_r wrote: | | when you use the 'Open' statement and the file specified doesn't exist, it is created. |
Only if you open in for output. If you open for input you get an error that the file doens't exist  _________________ No one is completely useless. They can at least be an example of what to avoid. |
|
| Back to top |
|
RoofRabbit Regular

Joined: 06 Jul 2005 Posts: 95 Location: Lenoir, NC USA
|
Posted: Jul 6th, 2005 11:25 PM Post subject: |
|
|
Don't save files to the desktop. Too many programs put all kinds of garbage on it already.
For reading and writing text files or any other kind of vars to a file, check out some of the example code in the Visual Basic section on my website. _________________ Website - [link] |
|
| Back to top |
|
|