SCOUG-Programming Mailing List Archives
Return to [ 16 | 
February | 
2004 ]
 >> Next Message >>
 
 
 
Content Type:   text/plain 
"Okay.  I do the determination in the outer block (see my   
example).  And either way, the dimensions are known in the   
outer block. ..."  
 
There is none so blind as he that refuses to see.  Outer block.    
Inner block.  Downgrade engineering, upgrade programming.    
Yes, you have to be conscious of inner and outer blocks.  You   
not only have to be conscious but you have to conscientiously   
in writing designate them as such.  You have to   
conscientiously know when a variable gets allocated and   
when it gets freed, because you have to put it in writing.    
That's programming.  You prefer it one way;I, another.  That's   
style, but it's still programming.  
 
Of course, my example doesn't work.  I said it wouldn't.  It   
marks the fallacy of saying you use begin-end as Greg did to   
mark separate calculation code segments.  You can't do it   
here and get the type of dynamic allocation that you want.  
 
So why not forget the inner and outer blocks, global and local   
variables, about marking code altogether?  Why not have one   
block with its local variables and simply use allocate and free   
where you know you would have to use begin and end?  You   
don't have to know any more or any less.  
 
You know you can't have a matrix before you know its   
dimensions.  Thus you know the earliest point in which you   
can allocate it.  You know when your processing of it is   
complete.  That tells you when you can free it.  If you have to   
have two matrices or three or four or more up concurrently   
the process remains the same.  
 
Moreover, if you allocate your matrices as list entries,...nah, I   
won't pursue that here except that Pascal doesn't support   
aggregate operands.  
 
=====================================================  
 
To unsubscribe from this list, send an email message  
to "steward@scoug.com". In the body of the message,  
put the command "unsubscribe scoug-programming".  
 
For problems, contact the list owner at  
"rollin@scoug.com".  
 
=====================================================  
 
  
 >> Next Message >>
Return to [ 16 | 
February | 
2004 ] 
  
  
The Southern California OS/2 User Group
 P.O. Box 26904
 Santa Ana, CA  92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group.  ALL RIGHTS 
RESERVED. 
 
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International 
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
 
  |