Huh, yeah like Rudy said, how about
Result := (condition)
So your example
if Property = 'A' then Result := 'N';
becomes
Result :=
{ start anonymous method } function(old, test, new: string) : string
begin
Result := old;
if old := test then result := new;
end; { end anonymous method }
NO. anonymous method bad (IMHO) Much better is:
function tester(old, test, new: string) : string;
begin
Result := old;
if old := test then result := new;
end;
and then call it like
function domything : string;
begin
{do something to establish the initial value of result}
Result := tester(result, 'A', 'N');
end;
Fundamentally, you are trying to do something that just is not in the syntax of the language. The designer(s) of the Pascal language made syntax choices that give the language its 'flavor'. Other designers gave other languages different syntax because it appealed to them or they saw 'easy' ways to implement them or whatever. It is pointless to choose an implementation language and then bang against the design choices inherent in that language. If you are used to something working one way in one language that you don't see in Pascal, then you need to understand that you are now working in Pascal, not in that other language. Your goal is not to write a program that 'looks like a similar program in language X'; your goal is to solve a problem in the language you're are working with. EVERY language whether it is Pascal, Perl, Python, Lisp, Cobol, APL, Fortran, Simula, Visual Basic, or anything else has constructs to accomplish your goal. But they all look differently when they do it, and that is what makes them different from one another.