home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.pascal.borland      Borland Pascal was actually pretty neat      2,978 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,982 of 2,978   
   Dr John Stockton to All   
   Re: How to iterate through 80-100 proced   
   27 Dec 05 16:44:55   
   
   From: jrs@merlyn.demon.co.uk   
      
   JRS:  In article <1135565455.093918.312340@g49g2000cwa.googlegroups.com>   
   , dated Sun, 25 Dec 2005 18:50:55 local, seen in   
   news:comp.lang.pascal.borland, Jim Leonard  posted   
   :   
   >Dr John Stockton wrote:   
   >> Having defined all routines individually, can you not declare a constant   
   >> array of routine with contents being the list of routines?   
   >   
   >I think there's no way to avoid this, sadly :-)  I will combine your   
   >method with the method suggested later in the thread of scanning the   
   >source code and generating an include file; I think that's the best way   
   >to automate things.   
   >   
   >However, how to do execute a pointer?   
      
   IIRC, you don't have to have a list of type pointer; you can have a list   
   of a procedure type.   
      
      
   >How do I actually "execute" p?   
      
   Cast it to a procedural type, as I do in the cited program   
      
   type   
   ...   
   TaskFunc = function (var SP : PLET) : boolean ;   
      
   and execute as     Operate := TaskFunc(Task)(SP)   
      
      
   --   
    © John Stockton, Surrey, UK.  ?@merlyn.demon.co.uk   Turnpike v4.00   MIME. ©   
      TP/BP/Delphi/&c., FAQqy topics & links;   
        RAH Prins : c.l.p.b mFAQ;   
      Timo Salmi's Turbo Pascal FAQ.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca