Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Harbour Version 0.37 (c) reference Guid - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

CLASSDATA

Define a CLASSDATA variable for a class (NOT for an Object!)
---------------------------------------------------------------------------------

 Syntax

        CLASSDATA <DataName1> [,<DataNameN>] [ AS <type> ] [ INIT <uValue> ]

 Arguments

        <DataName1>    Name of the DATA      

        <type>         Optional data type specification from the 
                  following: Character, Numeric, Date, Logical, Codeblock,
                  Nil

        <uValue>       Optional initial value at program startup    

 Description

      CLASSDATA variables can also be thought of as the "properties" of an
      entire class. Each CLASSDATA exists only once, no matter how many
      objects are created. A common usage is for a counter that is
      incremented whenever an object is created and decremented when one
      is destroyed, thus monitoring the number of objects in existance
      for this class.

      You can use the "AS <type>" clause to enforce that the CLASSDATA is
      maintained as a certain type. Otherwise it will take on the type of
      whatever value is first assigned to it.  Use the "INIT <uValue>"
      clause to initialize that DATA to <uValue>  whenever the class is
      first used.

 Examples

     
      CLASS TWindow
         DATA   hWnd, nOldProc
         CLASSDATA lRegistered AS LOGICAL
      ENDCLASS
      

Status

      Ready

 Compliance

      CLASSDATA is a Harbour extension.

 Platforms

      All



See Also: Object Oriented Programming CLASS METHOD DATA

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