Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Help with File I/O

Author
Message
MattIsFun
22
Years of Service
User Offline
Joined: 4th Jan 2003
Location:
Posted: 4th Mar 2003 04:14
How would you do a basic output to a file? Say, if you wanted to export a list of numbers to a file or something? The tutorials and manual don't have any info on this and I've been trying to do it for a while.
andrew11
22
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 4th Mar 2003 05:09
To out put to a file use the open to write command.

OPEN TO WRITE File Number, Filename

You can write a file many ways (in a code box to save space).



A good way to output numbers that are accesable to the user is with the WRITE BYTE and the SKIP BYTES command.



Its in the help files go check.

"All programmers are playwrights and all computers are lousy actors."
-Anon.
andrew11
22
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 4th Mar 2003 05:14
Oops that dosen't work. You dont need the skip bytes command when writing.

The code should be:


"All programmers are playwrights and all computers are lousy actors."
-Anon.
andrew11
22
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 4th Mar 2003 05:17
Wish we could edit posts . You should add x=x+1 after Write byte and it is not viewable to the user. Sorry, type too fast.

"All programmers are playwrights and all computers are lousy actors."
-Anon.

Login to post a reply

Server time is: 2025-05-18 23:14:30
Your offset time is: 2025-05-18 23:14:30