home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 12806 < prev    next >
Encoding:
Internet Message Format  |  1992-07-21  |  1.3 KB

  1. Path: sparky!uunet!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!usc!noiro.acs.uci.edu!network.ucsd.edu!ucsbcsl!mcl!scott
  2. From: scott@mcl.ucsb.edu (Scott Bronson)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: SetHandleSize and SetPtrSize
  5. Message-ID: <scott.711758239@mcl>
  6. Date: 21 Jul 92 22:37:19 GMT
  7. References: <1992Jul18.160240.15039@welchgate.welch.jhu.edu>
  8. Sender: root@ucsbcsl.ucsb.edu
  9. Lines: 20
  10.  
  11. In <1992Jul18.160240.15039@welchgate.welch.jhu.edu> francois@welchgate.welch.jhu.edu (Francois Schiettecatte) writes:
  12.  
  13. >I'm sorry if this is a FAQ or well known but here goes:
  14.  
  15. >If I reduce the size of a handle/pointer using SetHandleSize or
  16. >SetPtrSize, do the contents of the handle/pointer get preserved
  17. >up to the size of my new handle/pointer. For example if I have a
  18. >handle  of 30000 bytes and I am only using 20000 bytes, if I 
  19. >set its size to 20000 bytes, will the contents be preserved?
  20.  
  21.  
  22. If this isn't a FAQ, it should be.  I've seen three questions about
  23. SetHandleSize in the past week or so.
  24.  
  25. Both calls retain as much data as is possible.  So, when increasing the size,
  26. all bytes up to the old size will be what was there before, and all the bytes
  27. added will be undefined.  When decreasing size, all bytes trunctated will be
  28. undefined, but all bytes still inside the block will be untouched.
  29.  
  30.     - Scott
  31.