HP3000-L Archives

October 1997, 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:
Steve Dirickson b894 WestWin <[log in to unmask]>
Reply To:
Steve Dirickson b894 WestWin <[log in to unmask]>
Date:
Wed, 29 Oct 1997 16:56:00 P
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
<<Please excuse what is probably a dump question from a "C" neophyte but,
I am tring to call the FFILEINFO Intrinsic (items 4 recsize and 10 eof).
 I am declaring recsize as short and eof as long.

The compiler telsss me that:
 line 61: error 1620: Argument 3 is not the correct type.
 line 61: error 1620: Argument 5 is not the correct type.

What am I doing wrong??>>


If your "C neophyteness" is based on experience in a call-by-reference
language (say, FORTRAN), you might have overlooked the fact that C is a
call-by-value language. If you want a called routine, which definitely
includes MPE intrinsics, to change the value of a variable, you have to
explicitly pass the address of that variable. Make sure you look over
Table 2-1 in the intrinsics manual and understand what the parameter-type
identifiers mean. When you see something like "I16" or "U32", that is a
by-reference parameter, and you need to pass the address of the
appropriate variable using the '&variablename' syntax. If you'd posted
the problem code (hint, hint) we would know immediately if this is the
problem.

I assume that you're writing CM code for an MPE V/E machine? If not, you
should be using item 67 with a 32-bit unsigned integer instead of item 4
with a 'short'.

Steve

ATOM RSS1 RSS2