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,031 of 2,978   
   Robert AH Prins to All   
   Re: Mismatched Array Sizes   
   28 Jan 06 21:43:51   
   
   From: prino@onetel.com   
      
   "HowardLR"  wrote in message   
   news:1138476111.829056.212740@f14g2000cwb.googlegroups.com...   
   >I set up it up to do range checking during compilation and I get no   
   >errors. Even when I recompile the libraries (one which has a similar   
   >situation) it builds with no errors. Don't get it...   
      
   Range checking only works at run-time, not at compile time, unless the   
   subscript is a constant that is out-of-bounds.   
      
   > I would put up some of the code but because of proprietary reasons I   
   > can't (yeah, even with code this ancient...)   
   >   
   > Because there are no descriptions, or design docs associated with this   
   > code, I am pretty much "winging" it. I am not positive that the   
   > erroneous test results I am getting are attributed to this problem. My   
   > attack is going to be to start ensuring that arrays are of like-sizes   
   > and there are none of what I spoke about previously. I am totally open   
   > to any other ideas.   
      
   Don't pass the number of elements directly, in BP/TP7 you can use   
   open-array parameters, where the compiler passes the upper-bound. You   
   can also use (sizeof(array) div sizeof(array[1]), which will be resolved   
   at compile-time.   
      
   Robert   
   --   
   Robert AH Prins   
   prino at prino dot plus dot com   
      
   --- 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