Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - . structure member operator (binary) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 .                   Structure member operator (binary)
------------------------------------------------------------------------------
 Syntax
   sStruct.member

 Arguments
   sStruct is a variable defined as a structure.

   member is a member name of the structure.

 Description
   The . operator allows to directly reference a member of a structure
   variable.

 Example
   #define EXAMPLE_OPERATOR
   #include example.hdr

   typedef struct EMPLOYEE
      char( 10 ) cNameLast
      char( 10 ) cNameFirst
      uint       uAge
      ulong      nSalary
   enddef
   
   proc PrintData static
   param EMPLOYEE sData
   ? sData.cNameLast
   ? sData.cNameFirst
   ? sData.uAge
   ? sData.nSalary
   endproc
   
   proc Test_912
   vardef
      EMPLOYEE sEmp
   enddef
   sEmp.cNameLast  := "Flintstone"
   sEmp.cNameFirst := "Fred"
   sEmp.uAge       := 37
   sEmp.nSalary    := 76000
   PrintData( sEmp )
   endproc

   proc main
   Test_912()
   endproc

See Also: typedef struct

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson