HP3000-L Archives

March 1995, Week 5

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:
Date:
Fri, 31 Mar 1995 00:49:58 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (179 lines)
This worked for me:
 
---------------file fum------------------------------
BEGIN
 
PROCEDURE DBCALL (L'STATUS, L'BUF, BUF'LEN);
           LOGICAL ARRAY L'STATUS, L'BUF;
           INTEGER BUF'LEN;
      OPTION EXTERNAL;
 
PROCEDURE DBSTATUS2 (L'STATUS, L'BUF, BUF'LEN);
         LOGICAL ARRAY L'STATUS, L'BUF;
         INTEGER BUF'LEN;
   OPTION EXTERNAL;
 
END.
-----------------------------------------------------
 
:purge foo
:build foo
:file splintr = foo
:run buildint.pub.sys;stdin = fum
 
--------------output of BUILDINT: -------------------
PAGE 0001   HEWLETT-PACKARD 32150A.03.1  SPL INTRINSIC BUILDER   (C) COPYRIGHT
H
EWLETT-PACKARD COMPANY 1976
 
 
 
 
PROCEDURE DBCALL (L'STATUS, L'BUF, BUF'LEN);
 
           LOGICAL ARRAY L'STATUS, L'BUF;
 
           INTEGER BUF'LEN;
 
      OPTION EXTERNAL;
 
 
 
PROCEDURE DBSTATUS2 (L'STATUS, L'BUF, BUF'LEN);
         LOGICAL ARRAY L'STATUS, L'BUF;
 
         INTEGER BUF'LEN;
 
   OPTION EXTERNAL;
 
 
 
END.
 
PAGE 0002   HEWLETT-PACKARD
 
 
 
        TYPE                          OPTIONS
            PARAMETERS
    N   NONE                0,1,2,3   LEVEL OF CHECKING               COLUMN 1
          COLUMN 2              COLUMN 3
    L   LOGICAL             E         EXTERNAL                      V   VALUE
        T   SEE TYPE       S   SIMPLE VARIABLE
    I   INTEGER             V         VARIABLE                      R
REFERENC
E                          A   ARRAY
    B   BYTE
                           P   POINTER
    D   DOUBLE
                           T   PROCEDURE
    R   REAL
                           L   LABEL
    E   EXTENDED
 
 
 
  NAME        TYPE  OPTIONS  #PAR
PA
RAMETERS
                                   1    2    3    4    5    6    7    8    9
1
0   11   12   13   14   15   16   17   18   19   20
DBCALL          N    0E        14   15   16   17   18   19   20
DBCALL          N    0E       3   RLA  RLA  RIS
 
DBSTATUS2       N    0E       3   RLA  RLA  RIS
 
 NO. ERRORS=000
-------------------------------------------------------------------
 
Sample usage of above SPLINTR-format file (FOO)...
compile the following (Pascal/V) and run it...
 
{t3.source cm norl}
 
program m;
 
type
   pac80          = packed array [1..80] of char;
   shortint       = -32768..32767;     {CM Pascal}
   str80          = string [80];
 
   image_status_array_type = array [0..9] of shortint;
 
var
   basename       : pac80;             {overkill}
   buf            : pac80;
   dummy          : shortint;
   len            : shortint;
   mode           : shortint;
   password       : pac80;             {overkill}
   s              : str80;
   statusa        : image_status_array_type;
 
Function  ascii   : shortint;                intrinsic;
Procedure dbopen;                            intrinsic;
Procedure print;                             intrinsic;
Procedure terminate;                         intrinsic;
 
$splintr 'foo'$
 
Procedure dbcall;                            intrinsic;
Procedure dbstatus2;                         intrinsic;
 
begin
 
print (buf, 0, 0);                     {blank line}
 
s := 'Welcome to the DBSTATUS/DBCALL test program';
print (s, - strlen (s), 0);
 
print (buf, 0, 0);                     {blank line}
 
      {for fun, show plabel for dbcall...}
 
s := 'plabel for dbcall is: %';
print (s, - strlen (s), octal ('320'));
 
dummy := ascii (waddress (dbcall), 8, buf);
len := 6;         {ascii, base 8, always puts 6 characters out}
print (buf, -len, 0);
 
      {try to open a non-database with dbopen...}
 
basename := '  editor.pub.sys;';       {first 2 chars will be updated}
mode := 1;
password := ';';
 
dbopen (basename, password, mode, statusa);
 
      {show DBCALL results...}
 
s := 'DBCALL:   ';
print (s, -strlen (s), octal ('320'));
 
dbcall (statusa, buf, len);         {does *NOT* require PM}
print (buf, -len, 0);
 
      {show DBSTATUS results...}
 
s := 'DBSTATUS: ';
print (s, -strlen (s), octal ('320'));
 
dbstatus2 (statusa, buf, len);         {does *NOT* require PM}
print (buf, -len, 0);
 
print (buf, 0, 0);                     {blank line}
 
end.
--------------------------------------------------------------------
sample output from above test program:
 
   Welcome to the DBSTATUS/DBCALL test program
 
   plabel for dbcall is: %134500
   DBCALL:   DBOPEN, MODE 1, ON editor.pub.sys
   DBSTATUS: -1  0  2974720  10289553  6553740  67819
 
SS

ATOM RSS1 RSS2