The following code snippet from Josef's "Flashcard-Demo.bas" shows how to do this, if I read it right:
Code:
'dim some test variables Dim S AsString*60 , Fl AsString*12 , Ff AsByte Dim Sdatetime AsString*18
Fl ="test.txt"
S ="test this"
'Now we are getting to it 'We can specify a file handle with #1 or #2 etc. or we can ask for a free ' file handle with the FreeFile function. It will return a free handle if there is one.
Ff =Freefile()' get a file handle
'With this file handle we refer to a file Open Fl ForOutputAs #ff ' open fikle for output ' we need to open a file before we can use the file commands ' we open it for OUTPUT, INPUT , APPEND or BINARY ' In this case we open it for OUTPUT because we want to write to the file. ' If the file existed, the file would be overwritten. Print #ff , S ' print some data Print #ff , S
Print #ff , S
Print #ff , "A constant"; S
Testsb Ff
Close #ff ' close file
'A file opened if OUTPUT mode is convenient to write string data too 'The next beta will support WRITE too
'We now created a file that contains 3 lines of text. 'We want to append some data to it
S ="this is appended" Open Fl ForAppendAs #150' we specify the file number now Print #150 , S
Close #150
The above is line number 80 through 113. As you can see, there is a line
Code:
Open Fl ForOutputAs #ff
F1 is a variable defined in line 83.
I would imagine that there is a way where you can read some data from your stroage device (SD card, or whatever) that would have information you could read into a variable. Just be sure that the variable is a string.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum