[Gambas-user] Saving multiple variables
Rob Kudla
sourceforge-raindog2 at ...94...
Sun Sep 25 22:47:07 CEST 2005
On Sun September 25 2005 12:27, Scott wrote:
> Thank you. I apologize for my ignorance, before using Gambas I
> only knew how to program a bit in Qbasic, but how do I load and
> split up the variables to be used in the program?
dim arr as new String[]
arr = Split(File.Load(filename.txt), "\n")
var1 = arr[0]
var2 = arr[1]
var3 = arr[2]
You could, of course, do both the save and the load almost the same
way you did it in Qbasic, with OPEN and PRINT# and LINE INPUT# and
CLOSE, but I think this syntax is a lot easier to type.
Rob
More information about the User
mailing list