Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Database help-Reading and Writing saved variables
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
LindenRulz




PostPosted: Fri Aug 24, 2007 2:06 pm   Post subject: Database help-Reading and Writing saved variables

I am trying to create a database. I need help trying to read a saved integer variable, then add to it (ex. uploading a 10 and add 5 to it to make it 15) and then saving that integer variable as a 15
Sponsor
Sponsor
Sponsor
sponsor
Nick




PostPosted: Fri Aug 24, 2007 2:09 pm   Post subject: RE:Database help-Reading and Writing saved variables

so if your varible is a which is 10 you could use
Turing:
a:=a+5
or simply
Turing:
a+=5

or did you mean from a file?

if so then use this
Turing:
var input:int
open: input "file location" get;
get: input; varibles
close (input)


it's prretty straight foward
what your doing is opening the file and setting premade varibles to whatever the file has inside...
generally you use text documents for this
LindenRulz




PostPosted: Fri Aug 24, 2007 2:28 pm   Post subject: Re: Database help-Reading and Writing saved variables

the hardest part for me would be to access the original number of 10 from a .sav file
Nick




PostPosted: Fri Aug 24, 2007 2:29 pm   Post subject: RE:Database help-Reading and Writing saved variables

so if you were to open the .sav file in a text document and it reads 10 on the first line the open would work too
Clayton




PostPosted: Fri Aug 24, 2007 6:41 pm   Post subject: RE:Database help-Reading and Writing saved variables

You've asked a relatively vague question. In what format is your database? How large is it, etc. The best answer I can give you without this kind of information, is to go to the Turing Walkthrough, and read up on File I/O and see where that gets you.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: