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