home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / programm / 20009 < prev    next >
Encoding:
Internet Message Format  |  1992-12-20  |  1.4 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: Think Pascal->C conversion -- advice?
  5. Message-ID: <1992Dec18.021125.23146@afterlife.ncsc.mil>
  6. Date: 18 Dec 92 02:11:25 GMT
  7. Organization: The Great Beyond
  8. Lines: 27
  9.  
  10.  
  11. Hi..
  12.  
  13.    I'm in the process of converting a large, complex program written with
  14. Think Pascal to Think C.  I'm pretty fluent in both Pascal and C, and
  15. programming the Mac, but I was curious if anyone else has done this and
  16. what types of problems they ran into, or what types of things I should be
  17. careful about.
  18.  
  19.    I am not the primary author of this code, so I'm not very familiar with
  20. it, which puts me at a disadvantage.  It's also quite large.
  21.  
  22.    Some things I see that might be a problem are translating things such as
  23. packed arrays of boolean (in Pascal, which I believe are 1-bit in size) yo
  24. something equivalent in C.  (I can't use integers to represent booleans,
  25. because 2 (or 4) bytes is much too large for something that only takes a bit.
  26. Think C has a Boolean data type -- but this isn't part of ANSI C, is it?
  27. This code needs to be ANSI-C compliant.)  That's probably not a major hurdle,
  28. but it's little things like that which pop up and make me more cautious.
  29.  
  30.    Well, if anyone has any suggestions or helpful hints, I'd be grateful if
  31. you pass them my way.
  32.  
  33. Thanks!
  34.  
  35. M. Scott Smith
  36.   (mssmith@afterlife.ncsc.mil)
  37.