home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!ucbvax!cel.cummins.com!philip
- From: philip@cel.cummins.com (Philip D. Pokorny)
- Newsgroups: comp.sys.apollo
- Subject: Re: Node ID from C
- Message-ID: <9208201514.AA02375@cel.cummins.com>
- Date: 20 Aug 92 15:14:26 GMT
- Sender: daemon@ucbvax.BERKELEY.EDU
- Distribution: world
- Organization: The Internet
- Lines: 39
-
- Greg Pritchett writes:
- > I have used the following in the past. Unfortunately, it's not
- > documented ( or supported ! ) . It used to work on a flat 10.0
- > and I've just tested it on a 10.3.5 machine , so I guess it will
- > work on your 10.3. Hope this helps . . .
- >
- > extern std_$call void msg_$get_my_node();
- ^^^^^^^^^
- DANGER DANGER DANGER This interface is no-longer recommended
- The newer and better way to declare this is to use ANSI
- prototypes (if you have C 6.8) and the Reference Variable
- extension borrowed from C++:
-
- extern void msg_$get_my_node( long &node_id );
-
- >
- > main ()
- >
- > {
- > long node_id;
- >
- > msg_$get_my_node ( node_id );
- >
- > printf ("Node id %X\n", node_id );
- ^^ ^^^^^^^
- Type mis-match... This should be:
-
- printf( "Node id: %lX\n", node_id );
-
- >
- > }
-
- Neat call... I'll have to file this one away...
-
- Sincerely,
- Philip D. Pokorny
- philip@cel.cummins.com
- :)
-
-