Name

New to FreeBASIC? Post your questions here.
Post Reply
nimdays
Posts: 236
Joined: May 29, 2014 22:01
Location: West Java, Indonesia

Name

Post by nimdays »

Code: Select all

name "E:\FreeBASIC-1.02.0-win32\project\php","E:\FreeBASIC-1.02.0-win32\project\fltk\php"
From the manual : Renames a file or folder originally called oldname to newname.
But from the code above ,php directory now inside fltk folder ,this is like move yes ?
Just curious before i change my little file manager again.
Thanks
grindstone
Posts: 862
Joined: May 05, 2015 5:35
Location: Germany

Re: Name

Post by grindstone »

nimdays wrote:But from the code above ,php directory now inside fltk folder ,this is like move yes ?
That's correct.

Regards
grindstone
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: Name

Post by Tourist Trap »

nimdays wrote:From the manual : Renames a file or folder originally called oldname to newname.
Thanks
Someone knows what the reason for this keyword is not to be named simply 'rename' ? This would release by the way access to name as a variable name.

Code: Select all

Name Name, Rename
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Re: Name

Post by dkl »

It's taken from QB, like many things in FB.
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: Name

Post by Tourist Trap »

dkl wrote:It's taken from QB, like many things in FB.
I see. I'll continue to use ID for variables so, as a synonym.
jevans4949
Posts: 1186
Joined: May 08, 2006 21:58
Location: Crewe, England

Re: Name

Post by jevans4949 »

IMO, it's best to avoid using as a variable name anything that MIGHT be, or become, a keyword. So call your variable xname, or pname, or something like that.
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: Name

Post by Tourist Trap »

jevans4949 wrote:IMO, it's best to avoid using as a variable name anything that MIGHT be, or become, a keyword. So call your variable xname, or pname, or something like that.
To give you the full explanation, 'name' is a very standard property for many objects in visual basic.
nimdays
Posts: 236
Joined: May 29, 2014 22:01
Location: West Java, Indonesia

Re: Name

Post by nimdays »

Thanks all :)
Post Reply