<p style="padding:0 0 0 0; margin:0 0 0 0;">I guess Graeme meant to make non-monospaced font look like monospaced in Lazarus editor which currently doesn't work (it looks very ugly).</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">V.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">______________________________________________________________<br />
> Od: Jürgen Hestermann <juergen.hestermann@gmx.de><br />
> Komu: FPC-Pascal users discussions <fpc-pascal@lists.freepascal.org><br />
> Datum: 21.11.2016 17:05<br />
> Předmět: Re: [fpc-pascal] Underscores in numerical literals - grouping<br />
></p>
Am 2016-11-21 um 15:46 schrieb Graeme Geldenhuys:<br />
> The age old rule<br />
> of programmer source code always being in a mono-spaced font is<br />
> ridiculous for this day and age.<br />
><br />
Why?<br />
I like monospaced fonts for code very much.<br />
<br />
Code is not a novel or a newspaper where you read<br />
a lot of text from top down to the end in a linear manner.<br />
Instead, alignment is very important to make code more readable.<br />
Monospaced fonts make it much easier to align code and<br />
make a lot of things align 'automatically'.<br />
<br />
I even align procedure headers like the following where all variables and<br />
all types start at the same column<br />
(which may not be visible in this email if you use proportional fonts ;-).<br />
Please copy it to notepad or into Lazarus Editor in this case):<br />
<br />
---------------------------------------------------------------------<br />
procedure TForm1.FunctionListGetHintSize(Sender : TBaseVirtualTree;<br />
Node : PVirtualNode;<br />
Column : TColumnIndex;<br />
var R : TRect);<br />
---------------------------------------------------------------------<br />
<br />
and I align the 'MaskFilter' variable in such a for loop:<br />
<br />
---------------------------------------------------------------------<br />
for i := Low (MaskFilter) to<br />
High(MaskFilter) do<br />
---------------------------------------------------------------------<br />
<br />
and I like such an aligned declaration<br />
<br />
---------------------------------------------------------------------<br />
function FileCompareName (Datei1,Datei2 : PFileTyp) : SizeInt;<br />
function FileCompareDate (Datei1,Datei2 : PFileTyp) : SizeInt;<br />
function FileCompareSize (Datei1,Datei2 : PFileTyp) : SizeInt;<br />
function DirCompareFilesInBranch (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function DirCompareBytesInBranch (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function DirCompareDirsInDir (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function DirCompareDirsInBranch (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function DirCompareDirName (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function TreeCompareFilesInBranch(Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function TreeCompareBytesInBranch(Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function TreeCompareDirsInDir (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function TreeCompareDirsInBranch (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function TreeCompareDirName (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
---------------------------------------------------------------------<br />
<br />
much more than a non-aligned:<br />
<br />
---------------------------------------------------------------------<br />
function FileCompareName (Datei1,Datei2 : PFileTyp) : SizeInt;<br />
function FileCompareDate (Datei1,Datei2 : PFileTyp) : SizeInt;<br />
function FileCompareSize (Datei1,Datei2 : PFileTyp) : SizeInt;<br />
function DirCompareFilesInBranch (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function DirCompareBytesInBranch (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function DirCompareDirsInDir (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function DirCompareDirsInBranch (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function DirCompareDirName (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function TreeCompareFilesInBranch (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function TreeCompareBytesInBranch (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function TreeCompareDirsInDir (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function TreeCompareDirsInBranch (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
function TreeCompareDirName (Dir1,Dir2 : PTreeTyp) : SizeInt;<br />
---------------------------------------------------------------------<br />
<br />
You can see imeditately that many functions have the same parameters and all result in a SizeInt.<br />
In the non-aligned version this is harder to spot.<br />
<br />
_______________________________________________<br />
fpc-pascal maillist - fpc-pascal@lists.freepascal.org<br />
<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a><br />