I made your example working for Free Pascal, if Virtual Pascal is simular enough you can port it to Virtual Pascal
PROGRAM Test;
{$modeswitch nestedprocvars}
// docs see https://www.freepascal.org/docs-html/ref/refse17.html
TYPE
t_Action = PROCEDURE is nested;
PROCEDURE Menu (Action : t_Action);
BEGIN
Action;
END;
PROCEDURE CallMenu;
VAR
Value : LONGINT;
Action : t_Action;
PROCEDURE DoSomething;
BEGIN
WRITE('Value: ',Value);
END;
BEGIN
Value := 1;
Action := @DoSomething;
Menu(Action);
END;
BEGIN
CallMenu;
READLN;
END.
P.s. afaik this is a feature that VP doesn't have, and it won't work. The fact that you had to add so many @'s was a dead give away that the type safety was violated, and thus unreliable.
The problem is that your procedure is nested, but you use a "global procedure" type declaration when declarating the procedural type (and VP has no other one to my best knowledge, no way to define it as nested) FPC does, the "is nested" in the example.
p.s.2 VP afaik still has a facebook group somewhere that provides support. I suggest you try there or switch to Free Pascal, as you probably should anyway.