procedure inside of a procedure 
Author Message
 procedure inside of a procedure

can I do this please email me....:(
unhappy in Lynn
:)




Sun, 22 Mar 1998 03:00:00 GMT  
 procedure inside of a procedure

Of course you can !!

Procedure A:

   Procedure B:
   Begin
      Writeln('In Procedure B');
   End;

Begin { A }
  Writeln('In Procedure A');
End;

Just pay attention with any variables, especially their scope !

HTH

Ray Cramer



Mon, 23 Mar 1998 03:00:00 GMT  
 procedure inside of a procedure

Quote:
> can I do this please email me....:(
> unhappy in Lynn
> :)



Yes you can. It cold have a strukture like this :(ekample)

PROCEDURE start;
VAR
  a,
  b : Integer;

  PROCEDURE start1
  BEGIN
    .
    your code
    .
  END;
  FUNCTION start2
  BEGIN
    .
    .
    .
  END;
  PROCEDURE start3
  BEGIN
    .
    .
    .
   END;

BEGIN (* main program IN proceduere *)
  start1
  IF start2 THEN start3;
END;

(* MAIN PROGRAM *)

BEGIN
  start;
END;

Ronny Reitan
email : ronny#nvg.unit.no



Tue, 24 Mar 1998 03:00:00 GMT  
 procedure inside of a procedure

Quote:
> can I do this please email me....:(
> unhappy in Lynn
> :)



Yes you can. It cold have a strukture like this :(ekample)

PROCEDURE start;
VAR
  a,
  b : Integer;

  PROCEDURE start1
  BEGIN
    .
    your code
    .
  END;
  FUNCTION start2
  BEGIN
    .
    .
    .
  END;
  PROCEDURE start3
  BEGIN
    .
    .
    .
   END;

BEGIN (* main program IN proceduere *)
  start1
  IF start2 THEN start3;
END;

(* MAIN PROGRAM *)

BEGIN
  start;
END;

Ronny Reitan
email : ronny#nvg.unit.no



Tue, 24 Mar 1998 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. readln inside a procedure

2. Calling another storedprocedure from inside a stored procedure??

3. Calling a procedure within a procedure

4. HELP - calling a Procedure from with a Procedure??

5. re : main-->procedure coomunication + Menu Procedure

6. Using a Procedure within a Procedure?

7. Procedure as parameter in procedure

8. Fast PutCharacter Procedure &/or remove cursor procedure

9. fast putchar procedure and remove cursor procedure needed for lord II type game

10. passing procedures as arguments for another procedure in Turbo pascal

11. passing procedures as arguments for another procedure in Turbo pascal

12. passing procedures as arguments for another procedure in Tu

 

 
Powered by phpBB® Forum Software