We have a family simple but effective set of rules for naming variables.
It's easy to follow and easy for anybody to know immediately what type of
variable it is:

Variable Naming Conventions

Begin each variable name with a character to specify what type it is:

·     String: s

·     Text: t

·     Boolean: y

·     Date: d

·     Time: h

·     Blob: b

·     Integer: i

·     Longint: o (because l looks too much like i)

·     Real: r

·     Object: j (because o has been in use for Longint)

If it’s a string then follow this with the string length.

If it’s an array, preface it with “a”

If it’s a 2-D array, preface it with “a2“

Follow this with a meaningful description of the variable.



Examples:

tErrorMessage (text variable for error messages)

atDocInfos – text array of document info

a2tFileInfos - 2-dimensional text array

On Fri, 14 Dec 2018 at 15:28, Tom Benedict via 4D_Tech <[email protected]>
wrote:

> Anybody out there have a style guide for development that they’ve written?
> I know a lot of people use shells that either they or others have written
> and that goes a long way toward supporting ease of maintenance of an app.
> Have you formalized guidelines on coding style, UI standards, naming
> conventions etc? I’m especially looking for examples that have worked well
> in team development.
>
> Thanks for any input.
>
> Tom Benedict
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[email protected]
> **********************************************************************



-- 
*************************************************
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to