[Gambas-user] Re: RENAME - thanks!!

Allen Murphy msumurph at ...626...
Wed Mar 29 00:52:13 CEST 2006


Thanks Ron!

You are correct, I found the announcement in the ChangeLog for version
1.9.25.  I actually do remember reading that too.  I guess I forgot.
Rename still worked up to 1.9.26, but not after.

"NEW: The RENAME/AS instruction was replaced by the MOVE/TO
instruction."

The documentation on www.gambasdoc.org and the Help still include RENAME
but not MOVE.  That will need to be updated.

Take care,
Allen

P.S.  Thanks to all who have made Gambas a great development platform!


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