home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / hp / 14524 < prev    next >
Encoding:
Text File  |  1993-01-05  |  1.9 KB  |  49 lines

  1. Newsgroups: comp.sys.hp
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!cs.utexas.edu!hermes.chpc.utexas.edu!news.utdallas.edu!corpgate!brtph560!brtph46!rjohns
  3. From: rjohns@brtph46.BNR.CA (Richard Johns P205)
  4. Subject: Re: Bad escape codes on 9000/720?
  5. Message-ID: <1993Jan5.204601.22486@brtph560.bnr.ca>
  6. Sender: news@brtph560.bnr.ca (Usenet News)
  7. Reply-To: rjohns@brtph46.BNR.CA (Richard Johns P205)
  8. Organization: Bell-Northern Research Ltd.
  9. References:  <1993Jan5.170026.16862@brtph560.bnr.ca>
  10. Date: Tue, 5 Jan 1993 20:46:01 GMT
  11. Lines: 36
  12.  
  13.  
  14. In article <1993Jan5.170026.16862@brtph560.bnr.ca>,
  15. rjohns@brtph46.BNR.CA (Richard Johns P205) writes:
  16. |> I'm using HP Pascal on a 9000/720 under HP-UX 8.07.  It seems that the
  17. |> escapecode function isn't returning the correct values for runtime
  18. errors.  For
  19. |> example, resetting a file with permissions of 000 should raise an escapecode
  20. |> of 692 (FILE OPEN ERROR), but instead it's a huge number -- garbage. 
  21. Raising
  22. |> a escape code myself works, though.
  23. |> 
  24.  
  25. Ok, some more investigation and I find that there's a Pascal include file,
  26. /usr/include/pasesc.ph, that maps these "huge numbers" to reasonable numbers.
  27. For example, escape code 39321792 maps to error PasErr_600, which means I can 
  28. look up error 600 in /usr/lib/paserrs.  SO, NOW:
  29.  
  30. 1.  What's with these funny escape codes?  What good are they?
  31.  
  32. 2.  What's the recommended way of translating the constant PasErr_600 (which is
  33.     39321792) to 600 so I can look it up in the error message file?  Do I have 
  34.     to write a giant case statement?
  35.  
  36. 3.  Is there anything useful I can do with the error message catalog,
  37.     /usr/lib/nls/$LANG/pc_msgs.cat?
  38.  
  39. 4.  Why isn't any of this explained in the 700 series HP Pascal Reference or 
  40.     HP Pascal Programmer's guide?  One would think it'd be mentioned with the 
  41.     escape code stuff, at least.  Or under "Error Messages", or something.
  42.  
  43. Cheers,
  44.   Rick Johns
  45.   BNR
  46.   rjohns@bnr.ca
  47.  
  48. Disclaimer: I said it, BNR didn't.
  49.