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.

Newcomers DBPro Corner / saving/loading and running code from a text file

Author
Message
Pyromaniac
21
Years of Service
User Offline
Joined: 8th Jan 2003
Location: United Kingdom
Posted: 9th Feb 2003 23:32
hi, im pyromaniac, you may remeber me from such gormless posts as...etc

anyway, im looking for a method of making my program generate DBpro code, and then saving it into a file (.txt or whatver i can use) then opening it in a different program.
for example, in program A i click some stuff and it automatically generates the code into a file, then i can open and run it in program B

does anyone understand what I mean? and is this possible?
xmen
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location:
Posted: 10th Feb 2003 02:03
Why do you want to do that
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 10th Feb 2003 04:03
Part A of your plan is easy. Open a text file for writing and write strings to it containing DBPro code. Simple.

Part B however is impossible. You cannot load up a text file and parse it for commands and you cannot give away the DBPro compiler with your software making it somewhat difficult to achieve what you want.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 10th Feb 2003 04:06
o_O I'm trying to make a parser... from ASM to DarkBASIC... it hurts me lil head...

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/3072kbs Sat Con... I joined in!
Pyromaniac
21
Years of Service
User Offline
Joined: 8th Jan 2003
Location: United Kingdom
Posted: 10th Feb 2003 22:17
"Part B however is impossible. You cannot load up a text file and parse it for commands and you cannot give away the DBPro compiler with your software making it somewhat difficult to achieve what you want." <--

can i save to a dbpro or dba file somehow? I've seen this done in the particle generator (or particle factory or something like that)

Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 10th Feb 2003 22:46
Particle generator is my work... still not done... almost have v0.0.2 done though ^_^ heh ... uses dbpro as a runtime window and asm as a lil toolbar...

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/3072kbs Sat Con... I joined in!
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 11th Feb 2003 05:37
theres a code that writes code snippet on my freecode section.

it will show u how to write a text file.

the reverse is just reading them back in the same order.

Login to post a reply

Server time is: 2024-09-19 02:26:32
Your offset time is: 2024-09-19 02:26:32