[fpc-other] Underscores in numerical literals - grouping

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Wed Nov 23 15:03:58 CET 2016


On 2016-11-23 13:31, Jürgen Hestermann wrote:
> Also, you didn't align the parameters in your screenshot as I did in my example.
> I have one 'column' for:

If you want columns, then columns you shall have. ;-)
See attachment. I've also reduced the tabSize to 2, to make it more
representative of common Object Pascal coding style standards.

The only thing I can see that is still different to your original code
[which ET can't do] is make your const/var column right aligned.

See attached screenshot. Again, I've enabled jEdit's setting to show
where I inserted TAB characters to make it easier to reproduce.


> In the end, you arrange your alignment according to the limitations
> of elastic tabstops (ET)

Not at all. To the contrary, the "my style #2" is exactly the coding
standard I use in all my code (ET enabled or not). You are welcome to
verify this by looking at the fpGUI or tiOPF code available on
SourceForge. I use a coding style that is very similar, if not exactly
like, the code shown in Delphi 7's VCL units. So no, I didn't adjust my
styling to fit ET in any way, it just happens to work very well together.


ps:
  In case you are interested. jEdit supports local buffer settings
  embedded inside the file you are editing. For Object Pascal code,
  you can place the following anywhere in the first 10 or last 10 lines
  of a .pas file. If I had to use it, I would personally stick it at
  the end of the unit, far out of the way.

     { :mode=pascal:tabSize=2:elasticTabstops=true: }


Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Untitled4.png
Type: image/png
Size: 12574 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-other/attachments/20161123/1ba398e1/attachment.png>


More information about the fpc-other mailing list