Subject: | |
From: | |
Reply To: | Emerson, Tom # El Monte |
Date: | Fri, 8 Oct 1999 19:25:30 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
I have a program written for ccs's C compiler [compatability mode]. At this
point I have the opportunity to convert it to native mode using HP's
compiler, and after a few minor hurdles, I've hit a brick wall where HP's C
compiler is NOT behaving like the documentation says it should...
In particular, the program calls FOPEN to open/build a file; in so doing, it
sets the expected number of records for the file which is about the 9th or
10th parameter, and many of the preceeding parameters are "ommitted" (such
as the "forms message"...) The source has "#pragma intrinsic FOPEN" early
on, and HP's compiler is complaining:
error 1615: Default parameter specification not supported.
yet per the documentation, you're supposed to use "pragma intrinsic" to
SPECIFICALLY allow the use of "default parameters"
Here is a VERY simple sample that compiles & runs OK with CCSC, yet fails
w/HP's C
%print whotest.c
#pragma intrinsic who
#include <stdio.c>
int main(int argc, char* argv[])
{
char UserName[8];
who(,,,UserName);
printf ("Hello %s\n",UserName);
}
Specifying "who" as upper or lower case doesn't appear to help -- the first
three parameters [mode, attributes, & caps] are all "optional" parameters,
and HP's C won't take no for an answer...
What insanely obvious point have I overlooked here?
Tom Emerson
Sr. Systems Analyst
NDC | e COMMERCE
[log in to unmask]
626-258-4309
626-350-3832 FAX
|
|
|