T.R | Title | User | Personal Name | Date | Lines |
---|
2657.1 | | TLE::REAGAN | All of this chaos makes perfect sense | Tue Feb 11 1997 10:09 | 34 |
| It is the expected behavior.
The alignment/layout of a type is determine when the source is
processed/precompiled. The PEN file contains the compressed symbol
table of the compiler with the alignment/layout already decided.
Allowing you to re-compute the alignment during the inherit attribute
would make type checking impossible since the "name" wouldn't be
sufficient anymore to confirm that all users of the "name" agree on its
layout.
If you want to have a VAX version and an Alpha version, you'll have to
have 2 seperate PEN files. Since there isn't any pre-processor on
OpenVMS (or any cleaver %HOST or %TARGET directives) you can use a
logical name in the filespec so you can have only one set of sources.
For example,
[inherit('penfiles:data_layout.pen')]
module whatever;
end.
and then at compilation-time,
$ if f$getsyi("arch_name") .eqs. "VAX"
$ then
$ define/user penfiles disk$:[vax-specific]
$ else
$ define/user penfiles disk$:[alpha-specific]
$ endif
$ pascal whatever
-John
|
2657.2 | ...but do you really need two versions? | WIBBIN::NOYCE | Pulling weeds, pickin' stones | Wed Feb 12 1997 09:28 | 4 |
| Why do you want to have /ALIGN=VAX sometimes? Using
/ALIGN=ALPHA does take a bit more space, but it should
be faster, even on VAX. The /ALIGN=VAX rules date from
a time when memory was much more expensive...
|
2657.3 | | TLE::REAGAN | All of this chaos makes perfect sense | Wed Feb 12 1997 10:58 | 9 |
| Has the customer looked at the SYS$HELP:PASCAL_RECORD_LAYOUT_GUIDE.MEM
file? This document talks about different alignment, how to work
with both, why to keey using /ALIGN=VAX, when to convert existing data,
etc.
Are you sharing a single disk in a mixed-architecture cluster?
-John
|
2657.4 | Customer is happy | UTRTSC::WDEBAKKER | Feed your head | Thu Feb 13 1997 09:04 | 16 |
|
Thanks for the replies.
The reason that the customer is using this setup, is that
they have an application that gets data from DECmessageQ,
and I've been told that the inputdata is delivered as a
bytestream, and it is important for the application to
know that the fields are positioned identically in
memory on both platforms.
They have redefined the types to packed, and now the
application is 'seeing' the same image on both
platforms.
Thanks for your input,
Cheers,
Willem
|
2657.5 | | TLE::REAGAN | All of this chaos makes perfect sense | Thu Feb 13 1997 14:00 | 5 |
| Yes, PACKED is good way to help ensure data packing between
VAX and Alpha machines as long as you don't mind the performance
overhead of manipulating small data on non-byte boundaries.
-John
|