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 / 2 questions about reading/writing files

Author
Message
Monzi
20
Years of Service
User Offline
Joined: 10th May 2004
Location: Denmark
Posted: 7th Jun 2004 19:36
Isn't there any way to tell DBPro on what position it should read on, in a file opened by Open to Read? Like there is in many other basic languages.

Second question, how do i read a number in a file?
I know how to read a string with the Read String command.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th Jun 2004 19:51
look into TCA's plugins


* DBP_NETLIB_v1.2 - NOW WITH VARIABLE WATCHER! * Click Logo
Monzi
20
Years of Service
User Offline
Joined: 10th May 2004
Location: Denmark
Posted: 7th Jun 2004 19:52
Can neither of those two things be done in DBPro???
That sucks bigtime
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th Jun 2004 21:38
they can (I believe) with a bunch of coding. TCA has a plugin that does both already. Our plugin is pretty nifty as well


* DBP_NETLIB_v1.2 - NOW WITH VARIABLE WATCHER! * Click Logo
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 7th Jun 2004 22:11 Edited at: 7th Jun 2004 22:12
The only way you can tell which position to read from is by using SKIP BYTES.

Reading a number is easy;
if you wrote the number to the file using the
WRITE FLOAT/WORD/LONG commands then you just use the READ FLOAT/WORD/LONG command to read it back in.


If you want the text file to be human readable you need to READ/WRITE STRING and convert the string to a number using VAL()


can i scream

Login to post a reply

Server time is: 2024-11-26 20:38:35
Your offset time is: 2024-11-26 20:38:35