On 23 Nov 2002 at 13:05, John W. Hardy wrote:
I just discovered GPC and would like to know if it is fairly compatible with HP-Pascal.
I have used the "Pascal/1000" (for HP 1000 minicomputers) and "Pascal/64000" (for the HP 64000 microprocessor development station) variants extensively. There was no single "HP Pascal," as I recall, as each variant (e.g., "/1000", "/3000", "/9000") was tuned a bit to support features relevant to the host platform. However, all of the variants essentially were what was to become ISO-7195 Pascal ("Classic Pascal") with extensions.
Some of those extensions (e.g., "OTHERWISE" in CASE statements) appeared verbatim in the later ISO-10206 Pascal ("Extended Pascal") standard, others (e.g., structured constants) appeared with different syntax, and still others (e.g., the predefined "overprint" procedure) remained HP- proprietary.
GPC supports ISO-7185 and ISO-10206 (and other Pascal variants) and so will support a large part of the HP Pascals. Some specific areas needing syntactic conversion attention would be compiler directives, structured constant representations, numeric constant representations, etc. I have used a simple "sed" script to perform this conversion from Pascal/64000 for use by GPC, so the syntactic conversion probably won't be too hard.
In general, GPC is much richer than the HP Pascals, so I would think that conversion to GPC would be quite a bit simpler than trying to convert to C.
-- Dave