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.
|