function Test2 : boolean;
var
y,x : integer;
begin
{$I vm_risc_begin.inc}
y := 1
x := 1;
result := False;
if y=x then result := True;
{$I vm_risc_end.inc}
end;
function Test1 : boolean;
begin
{$I vm_risc_begin.inc}
result := False;
if Test2 then result := True;
{$I vm_risc_end.inc}
end;
Are the VM RISC Marker working correctly in BOTH functions?
What I mean is, Test1 calls Test2 but is within VM RiSC Marker. Then Test2 is executes and starts another VM RISC marker. A VM Marker inside another. Is this legal?
Yes, it will work correctly. The only thing that is not allowed is to literally include one marker into another, so between vm_risc_begin and vm_risc_end there can be no other markers.
In function Test1, if I have a logic "if X=0 then Exit;" that causes me to use the EXIT statement, will the VM Marker still work. Meaning I exit the function before the vm_risc_end marker.
I know it is a dumb question, but I just need to understand the VM RISC a little better.
function Test2 : boolean;
var
y,x : integer;
begin
{$I vm_risc_begin.inc}
y := 1
x := 1;
result := False;
if y=x then result := True;
{$I vm_risc_end.inc}
end;
function Test1 : boolean;
var
X : integer;
begin
{$I vm_risc_begin.inc}
result := False;
X := 0;
if X=0 then Exit;
if Test2 then result := True;
{$I vm_risc_end.inc}
end;