home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / pascal / 5127 < prev    next >
Encoding:
Text File  |  1992-08-31  |  920 b   |  36 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!news.cs.indiana.edu!umn.edu!doug.cae.wisc.edu!castlab.engr.wisc.edu!chris
  3. From: chris@castlab.engr.wisc.edu (Christian Rohrmeier)
  4. Subject: Procedural Variables
  5. Organization: U of Wisconsin-Madison College of Engineering
  6. Date: 31 Aug 92 14:50:28 CDT
  7. Message-ID: <1992Aug31.145029.16564@doug.cae.wisc.edu>
  8. Lines: 26
  9.  
  10. Thanks to all those who sent me replies to my question about dynamically calling
  11. a procedure via a variable.
  12.  
  13. It seems that is comes down to procedural variables.
  14.  
  15. The problem is, I can't seem to assign a variable to the proc. variable!
  16.  
  17. Here sample code given to me by Kjell:
  18.  
  19. Program TestProc;
  20.  
  21. Uses Crt;
  22.  
  23. Var Proc: procedure;
  24.  
  25. Begin
  26.   Proc:= ClrScr;
  27.   Proc;
  28. End;
  29.  
  30. This works. However, if I try Proc:='name_of_my_procedure' or to try and assign a
  31. string varibale to it I get a type mismatch.
  32.  
  33. Any ideas from the net?
  34.  
  35. -Chris
  36.