[Gambas-user] Version 2.7 / Problem with OPEN???

Benoit Minisini gambas at ...1...
Wed Jul 9 14:27:24 CEST 2008


On mercredi 09 juillet 2008, gambas at ...1938... wrote:
> Hello List!
>
> Like all other people new to this list, I have to say: Gambas rocks!! :-)
> The last six years I was a perl fellow...this changed in may 2008! ;-)
>
> Here is my problem:
> Docu says:
> Unlike other Basic dialects, Gambas will never delete a file when it is
> opened by the WRITE keyword for instance.  ....... To avoid this, open the
> file including the CREATE keyword.
>
> When I do this:
> LOGFILE = OPEN FilePath FOR CREATE WRITE
>
> Compiling my console program, gives me the following error message:
> Unexpected WRITE!
>
> When I do this:
> LOGFILE = OPEN FilePath FOR WRITE CREATE
>
> All went fine!!
>
> Is this a bug or a feature???? :-)
>
> Greetz
> Stevie
>

This is just the syntax. The CREATE keyword must come after the WRITE keyword. 
See the documentation of OPEN on the wiki.

Regards,

-- 
Benoit Minisini




More information about the User mailing list