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 17:13:00 P
Content-Type:
text/plain
Parts/Attachments:
text/plain (27 lines)
<<I also understand that the item's addresses must be byte addresses.>>


Definitely not. The distinction between 'byte address' and 'word address'
matters in Transact, but not C.

<<Here is example from some of my (running) programs:
     ....
     short    msg, recs;
     char     cbuf [MAXBUF+1];
     long     eof;
     foptions fop;
     ....
/* get name, foptions, record length, eof */
     mpe_ffileinfo ( msg, 1, cbuf, 2, (char*)&fop, 4, (char*)&recs, 10,
(char*)&eof );
     if ( ccode () != CCE ) doferr ( msg, "FG:recsize" );>>


Constructs like this will generally work (since the casts don't make any
difference in the generated code), but they will also typically generate
the diagnostic about "parameter nn points to a less strictly aligned
type". It's usually better to pass the type as what it really is, or
(where appropriate) as a more-demanding type.

Steve

ATOM RSS1 RSS2