[Gambas-user] RENAME in 1.9.28

ron ronstk at ...239...
Tue Mar 28 17:07:13 CEST 2006


On Tuesday 28 March 2006 15:13, Allen Murphy wrote:
> Hello,
> 
> I have found that with both 1.9.27 and 1.9.28 the RENAME command is not
> recognized.  I tried a new console project with 1.9.28 to test.  Here is
> the code below:
> 
> ' Gambas class file
> 
> STATIC PUBLIC SUB Main()
> 
>     DIM f AS String
>     
>     PRINT "Hello World"
>     
>     FOR EACH f IN Dir("/home/user", "*.*")
>         PRINT f
>     NEXT
>     
>     RENAME "file1.txt" AS "file2.txt "
>     
>     FOR EACH f IN Dir("/home/user", "*.*")
>         PRINT f
>     NEXT
>     
> END
> 
> When I execute the program, this message is returned:
> 
> Unknown Identifier: RENAME at line 13 in cMain.class.
> 
> This code works in earlier versions of Gambas and Gambas2.
> 
> Thank you,
> Allen
> 

A very few versions back there was a changlog about 
the change from 'RENAME xx TO yy' to be 'MOVE xx AS yy'.
However during translating I found still code after that 
announcement still existing as RENAME.

Also in one of the class files a function with the name 
'Rename' exists.
I was not able to translate that project by this naming problem.
(gambas2-with-editor I belive it was)

Also be carefull with 'OPEN xx FOR READ AS #hFile'.
New syntax announced as hFile = OPEN xx FOR READ ' (as FILE)
Is it for the developer version?
Can it be both ways and is planned to stay or will the old way 
dissapear in future?


Greets Ron






More information about the User mailing list