Welcome, Guest. Please login or register.

Author Topic: Some help with C syntax please  (Read 2088 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline golemTopic starter

  • Sr. Member
  • ****
  • Join Date: May 2002
  • Posts: 432
    • Show all replies
Some help with C syntax please
« on: August 14, 2006, 09:55:26 AM »
I'm a C novice and have come across an expression I can't get my head round in the RKM examples.

Here is an example;

/* Examine pending messages */
while ( message = (struct IntuiMessage *)GetMsg(win->UserPort) )
(

    etc.............

Its the use of the indirection operator I'm unsure of how it works in this context. Is it the same as the below in effect?

(struct IntuiMessage (*GetMsg(win->UserPort))

Help please
  :-?
                                                             
A1200 desktop, Blizzard 1260, OS3.9BB2, Indivision Mk II, SCSI Jaz, Ethernet
A1200 desktop, Blizzard 1230, OS3.1, Ethernet
A500, OS1.3
 

Offline golemTopic starter

  • Sr. Member
  • ****
  • Join Date: May 2002
  • Posts: 432
    • Show all replies
Re: Some help with C syntax please
« Reply #1 on: August 14, 2006, 06:59:00 PM »
Thanks Piru - I think I've asked that before as well but something in my head fights against it. But your explanation is clear. Cheers
                                                             
A1200 desktop, Blizzard 1260, OS3.9BB2, Indivision Mk II, SCSI Jaz, Ethernet
A1200 desktop, Blizzard 1230, OS3.1, Ethernet
A500, OS1.3