
-----------------------------------
LindenRulz
Fri Aug 24, 2007 2:06 pm

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

-----------------------------------
Nick
Fri Aug 24, 2007 2:09 pm

RE:Database help-Reading and Writing saved variables
-----------------------------------
so if your varible is a which is 10 you could use 
a:=a+5 or simply
a+=5
or did you mean from a file?

if so then use this
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
Fri Aug 24, 2007 2:28 pm

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
Fri Aug 24, 2007 2:29 pm

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
Fri Aug 24, 2007 6:41 pm

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.
