HP3000-L Archives

February 1996, Week 1

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:
Tue, 6 Feb 1996 12:18:29 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (83 lines)
Michael writes:
 
>    I feel rather foolish today.  I was working on my HPCICOMMAND replacement
 
(too hard on himself...not all intrinsics are declared "extensible", and
the intrinsic manual doesn't make it easy for you to determine which are)
 
> But 4 just so happens to be the number of parameters that the HPCICOMMAND
> intrinsic accepts and then it dawned on me.  Pascal, COBOL, and Fortran all
> handle the 'hidden' parameter count intrinsic for you.  C doesn't.  So when I
> modified my function to include a number_of_parms parameter, it all worked
> fine.
 
<PLUG>
 
The CSEQ tool knows all, tells all :)   ... here's an example:
 
:cseq HPCICOMMAND
CSEQ [2.0] - LPS Toolbox [A.01c]        (c) 1995 Lund Performance Solutions
 
Procedure HPCICOMMAND (
   Parm_0       : (# actual parameters)   {R26}
   cmdimage     : anyvar record  ;        {R25}
   cmderror     : var    int16   ;        {R24}
   parmnum      : var    int16   ;        {R23} := nil
   msglevel     :        int16   )        {SP-$0032} := 0
   {msglevel values:                                                   }
   {   0 show all errs/warns $stdlist                                  }
   {   1 show only errs to $stdlist                                    }
   {   2 show no errs/warns!                                           }
   {cmderror values:                                                   }
   {   >0 error                                                        }
   {   <0 warning                                                      }
   {   0  ok                                                           }
   {parmnum values:                                                    }
   {   <0 column number in cmdimage                                    }
   {   >0 file system error #                                          }
      extensible 4
      uncheckable_anyvar
 
</PLUG>
 
Note the "Parm_0" line, showing that the number of parameters is
a hidden parameter to the procedure.
 
<PLUG>
 
Better yet, for C programmers, try:
 
   :cseq
   set c
   hpcicommand
 
which returns:
 
void HPCICOMMAND (
   int32  num_actual_parms      /* R26 */
   void     *cmdimage,                    /* R25 */
   int16    *cmderror,                    /* R24 */
   int16    *parmnum,                     /* R23 */ = NIL
   int16     msglevel);                   /* SP-$0032 */ = 0
 
[SS: hmm...better fix those default values...should be inside the "*/"]
 
   /*  msglevel values:                                                    */
   /*     0 show all errs/warns $stdlist                                   */
   /*     1 show only errs to $stdlist                                     */
   /*     2 show no errs/warns!                                            */
   /*  cmderror values:                                                    */
   /*     >0 error                                                         */
   /*     <0 warning                                                       */
   /*     0  ok                                                            */
   /*  parmnum values:                                                     */
   /*     <0 column number in cmdimage                                     */
   /*     >0 file system error #                                           */
      /* extensible 4 */
 
</PLUG>
 
--
Stan Sieler                                          [log in to unmask]
                                     http://www.allegro.com/sieler.html

ATOM RSS1 RSS2