> In addition to consistency & clarity in showing variable type, do you from my 'Conventions' (all comment) method
//Variables //all process or interprocess vars are preceded by a type designator //I do not hold these conventions for local variables //this is in the form of : // letter(s)_variablename // letters for designator are always lower case //Variable names are always 1 word, with separate 'phrases' connected by an underscore //the first letter of each 'phrase' is always capitalized. //ex: al_My_Longint_Array variable naming specifics are NOT included here.... >do you > put any / much / no thought into using the variable names to > indicate business―vs technical―purpose? Depending on the code usage, it is not always possible to separate the 2 things - technical vs Business. If the code is generic (like might be found in a component) then the primary consideration for variable naming will be technical usage; however, Reporting, and/or user interface most often the usage in the interface is the paramount consideration for variable naming. i.e. Component : $Array_Pointer, $Loop_Counter, $Return_value Interface : r_Invoice_Line_Total, r_Invoice_Grand_total, l_Line_Item_Count For code that spans the gap, naming will be what seems to make the most sense. I *try* to make the code as readable, and 'self documenting' as possible, even in generic code I try to avoid code like this (completely made up): For ($i;1;$x) $y:= $z+$A+$f*$t/$R+$G-$k $v:=$y+$v end for and prefer code more like this (also made up): $Record_Count := Records in set("SomeSetName") .... For($i;1;$Record_Count) $Record_Total:= [table]Field1 *[table]Field2) + ([table]Field3 / [table]Field4) $Grand_Total := $Grand_Total + $Record_Total next record([table]) end for On Wed, 1 Aug 2018 21:17:40 -0400, David Eddy via 4D_Tech wrote: > > >> On Aug 01, 2018, at 3:00 PM, Jody Bevan <jody.be...@gmail.com >> <mailto:jody.be...@gmail.com>> wrote: >> >> >> 2. The naming convention must clearly show the type of variable. > > In addition to consistency & clarity in showing variable type, do you > put any / much / no thought into using the variable names to > indicate business―vs technical―purpose? > > ____________________________ > David Eddy > Babson Park, MA > > W: 781-455-0949 > > de...@davideddy.com <mailto:de...@davideddy.com> > ********************************************************************** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ********************************************************************** --------------- Gas is for washing parts Alcohol is for drinkin' Nitromethane is for racing ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************