[Gambas-user] writting an array to a file

Fabien Bodard abidoo.too at ...11...
Sat Jun 5 20:38:13 CEST 2004


Le samedi 5 Juin 2004 19:46, Fabien Bodard a écrit :
> Le lundi 31 Mai 2004 16:50, Grahame White a écrit :
> > Looking through the helpfiles I came across :
> >
> >
> >
> > Write
> >
> > SUB Write ( File AS File [ , Start AS Integer, Length AS Integer ] )
> >
> > Write array contents to a file.
> > Start specifies where the first element to write. By default, data are
> > written from the first element of the array.
> > Length is the number of elements that will be written to the file. By
> > default, data are written until the end of the array is reached.
> >
> >
> >
> > But how is it used? The only other reference to write I can find that
> > looks even remotely useful is for WRITE. The problem is that WRITE seems
> > to be for writing individual variables to the output stream :/
> >
> > I tried this :
> >
> > 	OPEN path FOR WRITE CREATE AS #Scoretable
>
>  	Print #Scoretable, Global.highscoreboard.join(",")
>
> > 	CLOSE #Scoretable
>
hem sorry
  	OPEN path FOR READ AS #Scoretable
>    	LINE INPUT #Scoretable, a$
>         Global.highscoreboard = split (a$, ",")
>  	CLOSE #Scoretable
>
>
>
> easy
> Fabien
>
> > but all I got was "Type mismatch: wanted Standard type, got Object[]
> > instead"
> >
> >
> > Grahame
> >
> > If you want more info on Global.highscoreboard then check one of my
> > earlier emails where I attached the project I'm working on
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: Oracle 10g
> > Get certified on the hottest thing ever to hit the market... Oracle 10g.
> > Take an Oracle 10g class now, and we'll give you the exam FREE.
> > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the new InstallShield X.
> From Windows to Linux, servers to mobile, InstallShield X is the one
> installation-authoring solution that does it all. Learn more and
> evaluate today! http://www.installshield.com/Dev2Dev/0504
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user




More information about the User mailing list