Computer Science Canada

Database help-Reading and Writing saved variables

Author:  LindenRulz [ 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

Author:  Nick [ 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

Author:  LindenRulz [ 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

Author:  Nick [ 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

Author:  Clayton [ 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.


: