Begin each variable name with a character to specify what type it is: · String: s · Text: t · Boolean: y
To add the Variable Type to the Variablename is a big help. I started many years ago to prepend the Type. And I am using the "4D Pop Marco Declaration" to automatically declare every variable. (I have a complete Regex Setup for prepending the Type if someone need it). But in the last days I am thinking if it would have been better to append the Type: For example: $t_Name vs. $Name_t. So if you are starting with a variable-name convention: Think about it first. And because of the Object-Tag names are case-sensitive, it makes sense to have a convention for the Object-Tag names too. I use: every Name-Part starts with a uppercase character and the rest is lowercase. Example Tags : "Last_Changed" , "Simple_Tag". My variable naming conventions : C_LONGINT($l_WinRef) C_OBJECT($o_parameter_3) C_REAL($r_Amount) C_TEXT($t_Customer_Code) C_BOOLEAN($b_ok) C_DATE($d_Budgets_End_Date) C_OBJECT($o_Parameter) C_POINTER($p_Table) C_Blob($bl_Var) ARRAY LONGINT($al_Budgets_Code;0) ARRAY REAL($ar_Sum_of_Trades;0) Bernd PS: be careful with arrays and "4D Pop Marco Declaration": It moves the declaration to the top of your Method. Use ARRAY LONGINT($al_Budgets_Code;0x000) to prevent it. PPS: A Collegue uses the "4D Pop Marco Declaration" in a complete another manner: He declares every variable by hand and then he uses the 4D Pop to find every untyped or mistyped Variable. It works this way because he has no "4D Pop Marco Declaration" setup for his convention. Am Fr., 14. Dez. 2018 um 16:28 Uhr schrieb Tom Benedict via 4D_Tech < [email protected]>: > 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] > ********************************************************************** ********************************************************************** 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] **********************************************************************

