From: nboogaar@ruunsa.fys.ruu.nl (Martin v.d. Boogaard)
Subject: Re: Using CLI Routines from VAX Pascal
Date: 4 Feb 90 13:40:24 GMT [thread overview]
Message-ID: <480@ruunsa.fys.ruu.nl> (raw)
In-Reply-To: 932@soleil.UUCP
Sorry to post this solution instead of mailing it. I've already wasted
enough time trying to reach people without decent Internet or BITnet
addresses. Below is my solution to the question of communication between
VAX Pascal and CLI. CLI is the only decent way to get VAX Pascal to detect
command line parameters. We finally found the values of CLI$_PRESENT etc.
in a C include file (see comments below). Don't ask me why DEC didn't include
info like this in its documentation on CLI and CDU.
Good luck,
Martin J. van den Boogaard
Dept. of Atomic & Interface Physics, Rijksuniversiteit, Utrecht
P.O. Box 80.000
decnet: ruunsc::boogaard NL-3508 TA Utrecht
bitnet: boogaard@hutruu51.bitnet the Netherlands
internet: nboogaar@fys.ruu.nl +31 30 532904
-----------------------------------cut here------------------------------------
module Pl_sys_decl;
{ Library of Pascal routines for use under VAX VMS.
Martin J. van den Boogaard
Dept. of Atomic and Interface Physics, R.U. Utrecht
Declarations for Pl_sys routines. }
{############################################################################}
type Byte_uns = [byte] 0..255;
Word_uns = [word] 0..32767;
Longword_uns = [long] unsigned;
{############################################################################}
const Pl_sys_line_length = 80;
{The following constants define so-called condition values, as they
are returned by system routines. This enables the programmer to
adhere to the notational conventions used in the DEC manuals. Off
course, these constants may be changed in a new VMS release! On node
RUUNSC (HUTRUU51) the information below was found in the following
text libraries on directory SYS$LIBRARY:
FORSYSDEF.TLB, module $SSDEF ;
VAXCDEF.TLB, module CLIMSGDEF.
Our VMS release is 5.1-1. Check your local files or system manager
to see if the constants in this module are up-to-date.}
SS$_NORMAL = %X'00001';
CLI$_COMMA = %X'3FD39';
CLI$_CONCAT = %X'3FD29';
CLI$_ABSENT = %X'381F0';
CLI$_PRESENT = %X'3FD19';
CLI$_NEGATED = %X'381F8';
CLI$_LOCPRES = %X'3FD31';
CLI$_LOCNEG = %X'38230';
CLI$_DEFAULTED = %X'3FD21';
{############################################################################}
type Pl_sys_line = varying [Pl_sys_line_length] of char;
{############################################################################}
[ external, asynchronous ] function CLI$GET_VALUE
( %stdescr Entity_desc:
packed array [ F1..L1: integer ] of char := %immed 0 ;
%stdescr Retdesc: packed array [ F2..L2: integer ] of char := %immed 0 ;
%ref Retlength: Word_uns := %immed 0 ):
Longword_uns; external;
{############################################################################}
[ external, asynchronous ] function CLI$PRESENT
( %stdescr Entity_desc:
packed array [ F1..L1: integer ] of char := %immed 0 ):
Longword_uns; external;
{############################################################################}
end.
{############################################################################}
-----------------------------------cut here------------------------------------
[inherit('pl_sys_decl.pen')]
module Pl_sys_cli (input, output);
{ Library of Pascal routines for use under VAX VMS.
Martin J. van den Boogaard
Dept. of Atomic and Interface Physics, R.U. Utrecht }
{############################################################################}
[global]
function Pl_sys_cli$get_value
( Entity_desc: packed array [ Ef..El: integer ] of char;
var Retdesc: varying [ Rl ] of char ):
integer;
{ Returns, in Retdesc, CLI entity described by Entity_desc. }
var Ret: packed array [ 1..Pl_sys_line_length ] of char;
Retlength: Word_uns;
begin
Pl_sys_cli$get_value :=
int (CLI$GET_VALUE ( Entity_desc, Ret, Retlength ) );
Retdesc := substr ( Ret, 1, Retlength );
end;
{############################################################################}
[global]
function Pl_sys_cli$present
( Entity_desc: packed array [ Ef..El: integer ] of char ):
integer;
{ Determines the presence of the CLI entity described by Entity_desc. }
begin
Pl_sys_cli$present := int ( CLI$PRESENT ( Entity_desc ) );
end;
{############################################################################}
end.
{############################################################################}
next prev parent reply other threads:[~1990-02-04 13:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1990-02-02 20:57 Using CLI Routines from VAX Pascal jogle
1990-02-04 13:40 ` Martin v.d. Boogaard [this message]
1990-02-06 22:19 ` Erland Sommarskog
-- strict thread matches above, loose matches on Subject: below --
1990-02-07 9:20 vanavermaet
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox