Forward Procedures
Posted: Mon Jan 03, 2011 11:06 pm
How do I declare a forward Procedure? The declaration:
Results in the error message "no ;" at the ^.
Code: Select all
PROCEDURE ^P(i: INTEGER);
A technical support group for Astrobe Oberon users
https://astrobe.com./forum/
Code: Select all
PROCEDURE ^P(i: INTEGER);
Code: Select all
PROCEDURE ProcA(a: INTEGER);
BEGIN
...
ProcB(a-1);
...
END ProcA;
PROCEDURE ProcB(a: INTEGER);
BEGIN
...
ProcA(a-1);
...
END ProcB;
Code: Select all
PROCEDURE ProcA(a: INTEGER);
PROCEDURE ProcB(a: INTEGER);
BEGIN
...
ProcA(a-1);
...
END ProcB;
BEGIN
...
ProcB(a-1);
...
END ProcA;
Code: Select all
VAR
procVarB: PROCEDURE(a: INTEGER);
PROCEDURE ProcA(a: INTEGER);
BEGIN
...
procVarB(a-1);
...
END ProcA;
PROCEDURE ProcB(a: INTEGER);
BEGIN
...
ProcA(a-1);
...
END ProcB;
BEGIN
procVarB := ProcB
END.