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 2,936 of 2,978   
   Robert Prins to rugxulo@gmail.com   
   Re: Speeding up code - am I missing some   
   01 Sep 18 10:08:35   
   
   From: robert@prino.org   
      
   On 2018-08-31 16:47, rugxulo@gmail.com wrote:   
    > Hi,   
    >   
    > On Thursday, August 23, 2018 at 9:56:01 AM UTC-5, Robert Prins wrote:   
    >>   
    >> One feature sadly missing from Pascal is the fact that PL/I allows you to   
   use   
    >> '*' as array extents in a called proc, and the (hidden) descriptors that   
   are   
    >> also passed to it allow you to call the same proc with   
    >> ...   
    >   
    > I don't quite understand what you mean here.   
    >   
    >> and a set of builtin functions (lbound and hbound) can be used to retrieve   
    >> the low and high bounds of the arrays. ;) It's a bit more convoluted to do   
    >> this with Pascal...   
    >   
    > Are you talking about conformant arrays? Schemata? Open arrays?   
    > Even Turbo Pascal (only later versions?) had LOW() and HIGH() built-ins.   
    > Is that what you meant?   
   Not really. or maybe.   
      
   Can Pascal (choose your flavour) handle passing these two different arrays of   
   structures to a single procedure:   
      
   dcl 1 s1,   
          2 s2(2,3),   
            3 v1     char (12),   
            3 v2     char (15),   
          2 s3(4,5),   
            3 v3     char (19),   
            3 v4     char  (1);   
      
   dcl 1 t1,   
          2 t2(7,8),   
            3 w1     char (14),   
            3 w2     char (77),   
          2 t3(3,3),   
            3 w3     char (12),   
            3 w4     char  (1);   
      
   Well, PL/I can:   
      
   myproc: procedure(parm);   
   dcl 1 parm,   
          2 p2(*,*),   
            3 w1     char  (*),   
            3 w2     char  (*),   
          2 s3(*,*),   
            3 w3     char  (*),   
            3 w4     char  (*);   
      
   and trying to assign a char(14) to w(1,1) will happily cut off the last two   
   characters when the procedure is passed s1. And when the SUBSCRIPTRANGE is   
   enabled, you'll get an error when trying to access w3(4,5) when t1 is passed to   
   the procedure.   
      
   I don't think there's an easy way to do the same with Pascal, but I'm ready to   
   be corrected.   
      
   Robert   
   --   
   Robert AH Prins   
   robert(a)prino(d)org   
      
   --- 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