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.

Author
Message
vivi
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 29th Jul 2003 15:50
I just wanted to know if I could export .txt in Darkbasic Pro and if it could be done how do I do it?
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 29th Jul 2003 16:02
Yep.



Oh, and if the file already exists, don't forget to delete it first (either manually or in code).
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 29th Jul 2003 16:07
I always recommend that you delete it in code, if it exists, just to be safe.



MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 29th Jul 2003 16:10
Getting perdantic here, but you should use a variable for both the file exist and delete file (and then any reading/writing areas). Same goes for handle numbers

Ie:



This way a spelling mistake wont cause strange problems etc...


Its better than a poke in the eye...
Eddie Gordo
23
Years of Service
User Offline
Joined: 14th Jan 2003
Location: Ohio - USA
Posted: 29th Jul 2003 17:29 Edited at: 29th Jul 2003 17:29
what if you misspell the variable...lol...and what about writing the indentations...i know the ascii code is 13,10 but how would this be done in DBPro, just write another string...

In our hearts and minds we keep the powers of love, hope and the hidden powers of evil in which we can mold a hero or daemon of ourselves-Book of Enoch Chapter III
Mnemonix
23
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 31st Jul 2003 17:56
You would just do chr$(13)+string$ for a carriage return
and chr$(10)+string$ for an indent.

"We are getting aggravated"
"Yes, we are"
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 31st Jul 2003 20:31
When you use WRITE STRING, it automatically adds the carriage-return and linefeed characters.

Login to post a reply

Server time is: 2026-07-23 02:36:47
Your offset time is: 2026-07-23 02:36:47