HP3000-L Archives

March 2002, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Thu, 14 Mar 2002 10:12:23 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (46 lines)
Re:
> A customer of ours run a home application developed in Pascal. The source
> codes are compiled with PASCAL/V compiler (A.01.32). In these times of
> migration times (not to mention CM runs performances), they will need (and
> have to) recompile their source codes with PASCAL/iX compiler.
>
> What are the consequences and all the tasks to perform when moving from CM
> to NM compiler ? I know some of them but I'm quite sure to miss some others.

Well, I must say that I've been impressed with how badly some Pascal/V
code was written :)

In many cases, long standing bugs get revealed when you move from Pascal/V
to Pascal/iX (because of differences in variable allocation and packing).

The biggest "gotcha" is the *VERY* bad design decision in Pascal/iX that
any range with a negative lower bound will always take 32 bits of
storage.  This means that if you have:
   type shortint = -32768..32767;
variables of that type will occupy 4 bytes (shudder).

Workaround: remove "shortint" type declarations, and rely on the standard
shortint that's available in Pascal/iX.   (Yes, Pascal/V should have had
shortint added to it decades ago, but that's another story.)

The other major thing we run into is differences in how records are packed.
There are some compiler directives that can help.

<plug>
Allegro has helped several customers port Pascal/V to Pascal/iX.
</plug>

BTW, Pascal is available for HP-UX today, so the customer's code might
survive if they're ever forced to leave the HP 3000 for, say, HP-UX.


P.s., despite a few quibbles, I think that HP's Pascal/iX is one of
the best Pascals out there.  They fixed Pascal's major shortcoming
(lack of type casting) in a very good way.

Stan Sieler                                           [log in to unmask]
www.allegro.com/sieler/wanted/index.html          www.allegro.com/sieler

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2