|  | 
 
'--------------
'COMPOUND TYPES
'==============
  type color32
  
    r as byte
    g as byte
    b as byte
    a as byte
    =
    rgba as long  'UNION
    
  end type
'-------------
'DERIVED TYPE:
'=============
  
  type colortext
  
    txt as string
    c as color32
    
  end type
  
  
  dim t as colortext
  
  t.txt=`Color code `
  t.c.r=8
  t.c.b=16
  t.c.g=32
  t.c.a=64
  
  print t.txt hex t.c.rgba
'print "STRUCTURE:
'" structureof color32
'-----------------
'SYNTAX VARIATIONS
'=================
  type color32
    byte r
    byte g
    byte b
    byte a
    =
    long rgba  'UNION    
  end type
  type color32
    byte r,g,b,a
    =
    long rgba  'UNION    
  end type 
  type color32 byte r,g,b,a = long rgba
  type colortext string txt,color32 c
  struct color32 { 
    byte r,g,b,a
   =
   long rgba
  }
  typedef struct _color32 { 
    byte r,g,b,a
   =
   long rgba
  } color32, *pcolor32
  typedef struct _color32 {
    union { 
      struct {
        byte r,g,b,a
      }
      long rgba
    }  
  } color32, *pcolor32
  '#recordof color32
  '#recordof _color32
  '#recordof colortext
 
   |