Name

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

Name

Postby nimdays » Jul 25, 2015 0:22

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: 744
Joined: May 05, 2015 5:35
Location: Germany

Re: Name

Postby grindstone » Jul 25, 2015 8:48

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: 2901
Joined: Jun 02, 2015 16:24

Re: Name

Postby Tourist Trap » Jul 25, 2015 11:03

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: 3212
Joined: Jul 28, 2005 14:45
Location: Germany

Re: Name

Postby dkl » Jul 25, 2015 13:16

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

Re: Name

Postby Tourist Trap » Jul 25, 2015 15:46

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: 1155
Joined: May 08, 2006 21:58
Location: Crewe, England

Re: Name

Postby jevans4949 » Jul 25, 2015 22:31

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: 2901
Joined: Jun 02, 2015 16:24

Re: Name

Postby Tourist Trap » Jul 26, 2015 3:48

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: ID

Re: Name

Postby nimdays » Jul 28, 2015 20:05

Thanks all :)

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 6 guests