Re: Pascal compilation (66 Views)
Reply
Advisor
Mark Battle
Posts: 23
Registered: ‎11-27-2007
Message 1 of 5 (66 Views)
Accepted Solution

Pascal compilation

I am migtating old Pascal code from VMS 5.5 to VMS 8.2 and get the following error messages.

PASCAL /DEBUG /NOOPT/NODIA xxx.pas

[INHERIT ('sys$library:decw$motif',
...........^
%PASCAL-F-FNF, file not found
at line number 1 in file xxx.pas

PASCAL /DEBUG /NOOPT/NODIA xxx2.pas

[INHERIT ('sys$library:decw$motif.pas',
...........^
%PASCAL-F-IVENVIRON, Environment sys$library:decw$motif.pas has illegal format, source analysis terminated
at line number 1 in file xxx2.pas

The file sys$library:decw$motif.pas exists and was created in 1993 according to the comments.

It appears that Environment files now have different formats. How do I procede.

Mark
Please use plain text.
Honored Contributor
Karl Rohwedder
Posts: 1,616
Registered: ‎10-29-2003
Message 2 of 5 (66 Views)

Re: Pascal compilation

According to the help, you need a so-called environment format for INHERIT to work.
This can be created with PASCAL/NOOBJECT/ENVIRONMENT.


PASCAL

Attributes

INHERIT

The INHERIT attribute indicates the environment file or files to
be inherited by a compilation unit. The environment files
specified by the INHERIT attribute must already have been
created in compilation units (by either the ENVIRONMENT
attribute or a compilation switch).

Syntax:

INHERIT( {name-string},... )

The compilation unit inherits one or more environment files
named by the file specifications in the name strings. The
default file type for an inherited environment file is .PEN.

regards Kalle
Please use plain text.
Honored Contributor
Kris Clippeleyr
Posts: 954
Registered: ‎04-19-2004
Message 3 of 5 (66 Views)

Re: Pascal compilation

Mark,

If I recall correctly, I ran into the same problem some years back. Apparently, when installing the PASCAL compiler, (some of) the necessary environment files are not generated from the source files.
As Karl hinted, you can brew your own by:
PASCAL/NOOBJECT/ENVIRONMENT sys$library:decw$motif.pas
This should give you a valid .PEN file that you can put in SYS$COMMON:[SYSLIB].
Regards,
Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Please use plain text.
Respected Contributor
John Reagan
Posts: 131
Registered: ‎05-30-2004
Message 4 of 5 (66 Views)

Re: Pascal compilation

The DECW$MOTIF.PAS/PEN files are not part of the Pascal kit. The DECW$MOTIF.PAS file is provied by DECwindows. Unfortunately, you have to compile it yourself into a PEN file.

$ pascal /noobj/env=sys$common:[syslib] sys$library:decw$motif.pas

BTW, the INHERIT attribute does not process .PAS source files, but only precompiled PEN files created with the /ENV qualifier. The formats for PEN files (at least on the same architecture) are upwards compatible. Newer compilers will always be able to handle old PEN files. As a point of trivia, I haven't changed the format since 1996.
Please use plain text.
Advisor
Mark Battle
Posts: 23
Registered: ‎11-27-2007
Message 5 of 5 (66 Views)

Re: Pascal compilation

Solution as described. Many thanks
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation