On 07/10/2010 02:20 PM, Damien Girard wrote:
Personnally I am using this naming convention:
- first letter in lowercase, then Uppercase for the first letter of each
word.

- tMyVariable ->  Variable available in the handler
- sMyVariable ->  Variable available in the script (local)
- gMyVariable ->  Global variable (global)
- kMyVariable ->  Constant (constant)
- cMyVariable ->  Variable that contain custom properties
- pMyParameter ->  Parameter

In C, I use the same naming convention, the difference is:
- Instead of Uppercase, I use "_" to separate words.

- t_my_variable ->  Variable available in the handler
- s_my_variable ->  Variable available in the file (static)
- g_my_variable ->  Variable available in the application (extern)
- k_my_variable ->  Constant
- p_my_paramater ->  Parameter (you see the *, you are not dumb, no need of a
"pointer" prefix)

And for C++/C#, same as Revolution. This enable me to mix C/C++ and to see
quickly in what file I am located.

After, for objects, I have no convention, but usually in rev I define the
name of objects only in lowercase, in order to not mix with variables.

All my softwares are written like that, and it works ;) (more than 20 000
lignes software...) (I stolen this convention from a Rev user, but I do not
remember who lol, btw thanks to him ^^)

Also, I am using DoxyGen in C/C++, and NativeDoc in Rev, that's helping a
lot :p


I think this is great and we really out to carry on this htread with as many poeple submitting their naming conventions as possible; we might then be able to abstract some sort of commonality which would allow us to develop a more standardised naming convention for RunRev.
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to