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 / Floats and Strings and Files........

Author
Message
Newbie Brogo
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: In a Pool of Cats
Posted: 27th Nov 2003 05:46
I'm trying to get something, where everytime you make a new file, it is saved as a different name,

doesnt work, but before u give my the for I=1 to 10 solution, i want them to do 1 and mabey he'd do something else, then make a new one, like a float 1#=1#+1
and i could save that float in a file and load it up again. How would i do this? thanks in advance.

You did what? For who?! For how many jellybeans?!?

las6
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 27th Nov 2003 09:43
for starters, try using more clear variable names.
like filenumber#. And why do you need float value? would normal integer do fine?

and I think You need to do that file opening like this:
file = 1
open to read 1,"ci\" + str$(file) + ".nsib"

that str$() will change the output of file variable (a number) to text. so the whole text for that command is "ci\1.nsib".

Keyboard not detected. Press F1 to continue.
Mickyfyn
20
Years of Service
User Offline
Joined: 27th Nov 2003
Location: UK
Posted: 27th Nov 2003 12:36
Hi

I am a darkbasic newbee but have some experience of Delphi, I would lie to create a random access file, but apart from a brief mention in 'The Beginners Guide to Dark Basic' I can find no way of structuring the file. Any advice would be welcome.

Mickyfyn
Newbie Brogo
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: In a Pool of Cats
Posted: 27th Nov 2003 18:36
thanks lots, worked perfectly

You did what? For who?! For how many jellybeans?!?

Login to post a reply

Server time is: 2024-09-21 11:39:15
Your offset time is: 2024-09-21 11:39:15