Very simple..
lets assume I added a SHL function to the BYTE helper, one has a function and one has a procedure..
Var
A,B :Byte;
Begin
A := 1; //make it something;
B := A.SL(Count); //Function; B = A shift left Count times, A is retained
A.SL(Count) // Procedure version; A = A Shl Count Times; A is now changed
I could do this using a FUNCTION version of it if I had a way of knowing how the variable is being parsed.
As returning a results or a direct operation on the variable.
Using the "SELF" identifier in the helper I can directly alter the arguments and being a function it returns dead weight
in code if I am not using it as a function, although not much code.
So if the compiler could decide on using a PROCEDURE if the call Is PROCEDURE based over a function in cases like this, this
would work out perfectly!
Procedure would not have the dead code for the return and I could directly alter the arguments via reference and then
if it was function based in nature it would just call the function instead.
This would prevent requiring two different identifiers in the helper , one as a PROCEDURE and other a FUNCTION...
P.S.
This is inline code also!
Do you understand now ?