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 - * indirection operator (unary) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 *                   Indirection operator (unary)
------------------------------------------------------------------------------
 Syntax
   *pObject

 Arguments
   pObject is a pointer variable to a memory object.

 Description
   The * operator dereferences a pointer. The syntax *pObject refers to
   the memory object pointed to by pObject. The argument for * is any
   pointer type; it can not be an expression. The result of
   dereferenciation is equivalent to an object of the data type that
   pObject points to.

 Example
   #define EXAMPLE_OPERATOR
   #include example.hdr

   proc Test_923
   vardef
      char        cString
      ptr( byte ) pChar
   enddef
   cString := "hello"       // initialize string
   pChar := &cString        // point to first byte of string
   ? cString                // print string
   *pChar := 0              // terminate string at its first byte
   ? cString                // print string
   endproc

   proc main
   Test_923()
   endproc

See Also: ptr()

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