home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / programm / 20082 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.7 KB

  1. Path: sparky!uunet!dtix!relay!relay2!afterlife!mssmith
  2. From: mssmith@afterlife.ncsc.mil (M. Scott Smith)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Think Pascal->C conversion -- advice?
  5. Message-ID: <1992Dec19.155027.15141@afterlife.ncsc.mil>
  6. Date: 19 Dec 92 15:50:27 GMT
  7. References: <1992Dec18.021125.23146@afterlife.ncsc.mil> <1992Dec19.025507.22441@eng.umd.edu>
  8. Organization: The Great Beyond
  9. Lines: 27
  10.  
  11. Hi..  Thanks for the information on converting, Ingemar and Matt.
  12.  
  13. Ingemar: I agree with you, and think that Think C offers nominal speed
  14. increases over Think Pascal; I am not converting the code in the interest
  15. of speed, the Pascal version runs fast enough.  There is a legitimate
  16. reason for converting the code to C, however.  (Otherwise I wouldn't
  17. be wasting my time doing it!)  Inevitably, this code is being designed
  18. to run on other platforms than the Mac, and this is just the first
  19. (necessary) step.
  20.  
  21. I will be using prototypes..  I would rather be converting C from Pascal
  22. as well.  In C you can easily accidentally write to all kinds of strange
  23. memory addresses, which are very hard to debug, while Pascal protects
  24. against that.  I just have to be very careful.
  25.  
  26. Matt: I like your idea for doing the 1-bit booleans, and I'll definitely
  27. give that a try.  Unfortunately, it looks like I really have to be careful
  28. about this, because this program uses a LOT of packed arrays and a lot
  29. of memory; substituting 2-byte variables for 1-bit ones could very
  30. well break it; and this becomes more of a problem if the code is proted
  31. to machines that have 4-byte integers, etc.
  32.  
  33. Thanks for your help!  (Also thanks to a person who sent mail to me, of
  34. which I forget your name now..  But you offered good advice as well.)
  35.  
  36. M. Scott Smith
  37.   (mssmith@afterlife.ncsc.mil)
  38.