Jump to content
Sign in to follow this  
Briegel

syntax of variables

Recommended Posts

Briegel

I'm not a programmer and a child understands better english then I. But I want to learn both. To easier read your scripts I want to know how to generally name variables.

I think you use ...

...$oXXXX -> for object variables and

...$hXXXX -> for handles variables.

Please would you explain if this is right and how is the naming for other variables?

Share this post


Link to post
Share on other sites
Daniel W.

When i create a script with much variables then i do it this way

$Button_Green ...
$Button_Blue..
$Label_xxx
$Object_shell
$Handle_xxx

and so on.


--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post


Link to post
Share on other sites
BPBNA

You can name a variable anything you want. You could name a string $notastring and it really wouldnt matter. There is no set syntax. Some people just like to use things like $a_Array or $s_String so that its easier to read and remember.

Share this post


Link to post
Share on other sites
SmOke_N

There are some variable names you can't use... look at $CmdLine and $CmdLineRaw... those are preset variable names with a purpose.

That's a good link plato offered there, I do try to follow the standard, but find myself sometimes off in left field.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Briegel

Thanks to all. The link from herewasplato is helpfully.

I thought there is a consensual agreement for a generally naming convention.

Briegel

Share this post


Link to post
Share on other sites
herewasplato

...The link from herewasplato is helpfully...

If only I had the discipline to follow it :-(

...enjoy...


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×