[Gambas-user] Set array from a file

Bodard Fabien gambasfr at ...11...
Tue Sep 7 21:34:13 CEST 2004


Le mardi 7 Septembre 2004 11:57, Sniper[CRY] a écrit :
> I have a file with contain:
>
> ste
> mark
> robby
> andrew
>
> Can I open the file and set array with the 4 name?

DIM myFile AS File
DIM $Value AS String
DIM arMyArray AS String[]

OPEN System.home &/ "myfile.txt" FOR READ AS #myFile


WHILE NOT EOF(myfile)

	LINE INPUT $val, #myfile
	arMyArray.add($Value)
	
WEND

CLOSE #myfile

I hope it work but i have the idea...

Fabien




More information about the User mailing list