7.11 Styleguide suggestions
Here are some suggestions to keep your code readable. As you have read
before, Hollywood does not distinguish between capitals and small letters
but to keep your code readable, we suggest the following styleguide rules:
- – always write inbuilt commands like they appear in this documentation but at least
begin them with a capital
- – write constants in capitals to distinguish them from variable names
- – write all preprocessor commands in capitals to highlight them
- – one command per line is usually enough!
- – use the "$" character only in string variables to avoid confusion
- – use the "!" character only in variables that carry floating point values
to avoid confusion
- – some comments won't hurt either
- – when using If blocks and loops, you should use tabs to structure the
different levels
- – you should prefix your own functions with a "p_" to distinguish them from
Hollywood functions (there might also be Hollywood functions in future
versions which have the same name as your functions which could lead to
unexpected results)
Show TOC