Skip to main content
12 events
when toggle format what by license comment
Nov 16, 2015 at 20:55 history edited cpicanco CC BY-SA 3.0
adding relevant information from commentaries
Nov 16, 2015 at 20:47 comment added cpicanco Pascal is case insensitive. It does not mean you should not be consistent with existing code: delphibasics.co.uk/RTL.asp?Name=WriteLn
Nov 16, 2015 at 20:46 comment added cpicanco Prefixing is the (Delphi/Free) Pascal way of better remember what your variables were created for (not getting lost), take a look at delphi.about.com/od/standards/l/bldnc.htm, for example.
Nov 13, 2015 at 9:55 comment added Tim I'm also a little confused as to the WriteLn over writeln - is that also the standard. Bear in mind I am asking for Delphi not free Pascal / Lazarus. What do you mean by getting lost? As in not knowing what variable does what?
Nov 13, 2015 at 8:23 comment added cpicanco Again, the point is not getting lost. Of course, you can check for yourself sourceforge.net/p/lazarus/code/HEAD/tree/trunk/examples
Nov 13, 2015 at 7:55 comment added Tim I will think about these. I essentially have to use Delphi but I'll consider the others. I especially like the use of case statements but I'm unsure the variable prefix is needed, and some of the other naming conventions seem strange. Thanks though.
Nov 13, 2015 at 3:16 comment added cpicanco For me works like that, PascalMethod, LPascalLocalVariable, AMethodValue, FFieldAttribute, TAbstractObject. As you can see, methods are not prefixed. But, again, for local variables there are no standards as far as I know.
Nov 13, 2015 at 3:05 comment added holroy I'm all for clarity in naming, but in C# or Python naming standards is used where you don't need prefixes, but rather use variations on camelCase or PascalCase or snake_case. And you should normally not have a problem knowing the type of a variable as that should be given by the name/context. The same applies for scope, as if your code is so long you don't have control of the scope you should add some procedures/methods/functions to narrow down the scope. But YMMV...
Nov 13, 2015 at 3:04 history edited cpicanco CC BY-SA 3.0
typo
Nov 13, 2015 at 3:01 comment added cpicanco @holroy, after all, the point is not getting lost. Works for me :)
Nov 13, 2015 at 2:58 comment added cpicanco FTA is common in Pascal, Free Pascal and Delphi. For local variables there are no standards, but you will frequently find S for local strings and I for loop integers. IS is an extension considering that fact.
Nov 13, 2015 at 1:03 history answered cpicanco CC BY-SA 3.0