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.

Dark GDK / File comands

Author
Message
AlbertoT
18
Years of Service
User Offline
Joined: 16th Aug 2005
Location:
Posted: 16th Aug 2005 10:20
Hello

Do file commands work ?

For example, if I write:

dbReadFloat ( 1, myfloat ) ;

I get an error message saying that the function does not accept 2 parameters.
I tried also
myfloat = dbReadFloat(1);

it compiles but I get false value
thanks in advance for your help

Alberto
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 16th Aug 2005 11:09
Try this :



Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
AlbertoT
18
Years of Service
User Offline
Joined: 16th Aug 2005
Location:
Posted: 16th Aug 2005 23:19
Hello
now it works, thanks.
May be I misunderstood but I thought that you can store up to 32 float values in the TEST.DAT file
I mean

dbOpenToWrite(1,"C:\\TEST.DAT");
dbWriteFloat(1,(float) 12.45);
dbCloseFile(1);
.......
.......
dbOpenToWrite(5,"C:\\TEST.DAT");
dbWriteFloat(5,(float) 13.60);
dbCloseFile(5);

But if I open to read the file #5

dbOpenToRead(5,"C:\\TEST.DAT");
value=dbReadFloat(5);

I alwayes get the first value = 12.45 instead of 13.60

Alberto

Login to post a reply

Server time is: 2024-04-18 20:53:53
Your offset time is: 2024-04-18 20:53:53