[fpc-devel] Semicolon before else
Aleksa Todorovic
alexione at gmail.com
Fri Jan 29 16:12:20 CET 2010
On Fri, Jan 29, 2010 at 13:23, Marco van de Voort <marcov at stack.nl> wrote:
>
> Depends. I do see a minor point for e.g. ++ and --, since I have been bitten
> by that when translating e.g. compression code (paszlib, lz77) when these
> are used in complex nested loops.
Hopefully, it would be easy to implement it "manually":
function PreInc(var value: T; Delta: Integer = 1): T;
function PostInc(var value: T; Delta: Integer = 1): T;
function PreDec(var value: T; Delta: Integer = 1): T;
function PostDec(var value: T; Delta: Integer = 1): T;
(with obvious implementation for any T supporting operator +/-).
One could even think of something like:
function generic<T> PreInc(var value: T; Delta: Integer = 1): T;
function generic<T> PostInc(var value: T; Delta: Integer = 1): T;
function generic<T> PreDec(var value: T; Delta: Integer = 1): T;
function generic<T> PostDec(var value: T; Delta: Integer = 1): T;
But... let's don't go there, generics are still not fully functional
in their present form.
More information about the fpc-devel
mailing list