HP3000-L Archives

April 1998, 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:
Jeff Woods <[log in to unmask]>
Reply To:
Jeff Woods <[log in to unmask]>
Date:
Tue, 7 Apr 1998 17:59:35 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (53 lines)
Lane Rollins wrote:
>>>I am trying to use the HPSORTINIT intrinsic from C (MPE not POSIX) and
>>>running into a problem due to C not supporting default parameter
>>>substitution. Is there any way not to supply file numbers to these
>>>subroutines?

Then Bruce Toback wrote:
>>Are you declaring the procedures with
>>
>>  #pragma intrinsic HPSORTINIT
>>
>>before using them? C is normally supposed to take care of the
>>peculiarities of Pascal parameter passing. However, I've seen some
>>routines where this doesn't work.

To which Lane Rollins said:
>Yes I have the pragma setup. C doesn't allow you to leave any paramters
>out of the middle fo a paramter list, off the end that's fine. SPL and
>PASCAL don't have a problem, I don't know about any of the other
>languages on the 3k.
>
>If life was perfect I would like the line to look like...
>
>hpsortinit( &sort_status,,,, sizeof(acct_info),, 1, keys );
>
>I get the following error message if I do....
>
>cc: "CMDLOCC.SMI.IDS", line 84: error 1615: Default parameter
>specification not supported.

C/iX *does* support default parameters in the middle of the function call
if the function is defined as an intrinsic with default parms.

Note that (unlike SPL and Pascal) tokens in C and in MPE/iX are normally
case sensitive.  The intrinsics defined in SYSINTR and declared in C/iX via
"#pragma intrinsic" are generally (always?) uppercase.  So, your call
should (assuming your parms are correct, as I didn't check) look like:

        HPSORTINIT( &sort_status,,,, sizeof(acct_info),, 1, keys );

This is all discussed in "HP C/iX Reference Manual" (06/92 edition, Reorder
# 31506-90005, Manufacturing Part # 31506-90011) in the 6 pages of Chapter
10, "Using Intrinsics".
--
Jeff Woods
[log in to unmask] at Tivoli Systems
[log in to unmask]   at home  [PGP key available here via finger]

Haiku by Rahul Sonnad:
   There is a chasm
   of carbon and silicon
   the software can't bridge.

ATOM RSS1 RSS2