@zamronypj
I wish that "result" variable can be mapped to another more meaningful name.
I am unsure if this is what you meant. But this is how I "remap" the result keyword...
{$macro on}{$Define Return:=result}
Procedure MyProc(Param1: Type1; Param2: Type2): Int64;
var intRslt : Int64;
Begin
intRslt := <somevalue>
Return := intRslt;
End;
Because of my C background (and .NET more recently), 'Return' just seems far more intuitive to me.
Likewise, it screws with my head for an If/Else block to not use an EndIf terminator. So, I use this, instead...
{$macro on}{$Define Return:=result}{$Define End_If:=//}
Procedure MyProc(Param1: Type1; Param2: Type2): Int64;
var intRslt : Int64;
Begin
intRslt := somevalue
If intRslt <> someothervalue Then
intRslt := someothervalue;
End_If; //False terminator
Return := intRslt;
End;
The reason I do it is because
If intRslt <> someothervalue Then
intRslt := someothervalue;
screws with my brain when I see it with no terminator. What would really make my day is if fp would stop using the curly brackets "{ }" to enclose directives and comments so they could instead be remapped via a macro to take the place of the 'begin' and 'end' keywords. I could do this...
[$macro on][$Define Return:=result][$Define {:=begin][$Define }:=end][$Define End_If:=//]
Procedure MyProc(Param1: Type1; Param2: Type2): Int64;
var intRslt : Int64;
{
intRslt := somevalue
If intRslt <> someothervalue Then
intRslt := someothervalue;
End_If; //False terminator
Return := intRslt;
};
Then, I could perform my Snoopy happy dance! But, alas... this will never come to be (and I won't ask for it). And unfortunately, as well, my beloved C will never be available in a WYSIWYG/RAD IDE.