• Description:
    Object is something like field of types or typed memory.

  • Syntax:
      OBJECT <name> [ OF <linkname> ]
        <item> [ <[size]> ] [ <:type> ] [ ,
        <item> ]
    

    Where <name> is the new OBJECT's name. <linkname> is the OBJECT whose all items will be inserted before items of this new OBJECT. <item> is the new item name. <[size]> means count of elements in the item. Pay attention, that one object's size is limited by 32 kB length. <:type> is one of types.

  • Item synonyms:
    Each item in object can have upto 31 synonyms, all of these must be separated by '|' sign.
      OBJECT Point
        X|x|R|r:FLOAT,
        Y|y|G|g:FLOAT,
        Z|z|B|b:FLOAT
    


  • Unions:
    This is very useful, if you want to use one object to store different types of values in same object but different memory block.
      OBJECT Help
        Type:UWORD,             // help type
        NEWUNION AmigaGuide     // amigaguide help
          File:PTR TO UBYTE,    // file name
          Node:PTR TO UBYTE     // node name
        UNION LocalHelp         // inlined help
          Text:PTR TO UBYTE,    // pointer to text
          Length:UWORD          // length of the text
        ENDUNION,               // end of the union
        HelpTitle:PTR TO UBYTE  // title of the help
    

    This will generate have length of 14 bytes: Type has 2 bytes, each UNION between NEWUNION and ENDUNION has the same start offset (in this case it is 2). Each UNION starts on even address, so if the address is odd, one byte is skipped. Then PowerD finds the longest UNION and adds it's length to the UNION offset (in this case has AmigaGuide 8 bytes and LocalHelp 6 bytes, 8 bytes used). Next item starts on this address.

    ATTENTION: see the commas, those have to be used exactly.

  • Pad bytes:
    Each non BYTE/UBYTE item must start on even address:
      OBJECT xxx               // SIZEOF_xxx = 6 bytes
        a:BYTE,                // offset=0
        b:BYTE,                // offset=1
        c:BYTE,                // offset=2
        d:WORD                 // offset=4
    


  • Linked objects:
      OBJECT PointList OF Point  // see OBJECT Point above
        Next:PTR TO Point,
        Prev:PTR TO Point
    

    is the same as:
      OBJECT PointList
        X|x|R|r:FLOAT,
        Y|y|G|g:FLOAT,
        Z|z|B|b:FLOAT,
        Next:PTR TO Point,
        Prev:PTR TO Point
    


  • Object sizes:
    With each object is generates one constant called SIZEOF_xxx, where xxx is object name, this constant contains the object length in bytes.