#COMPILE EXE "s50_union.exe"
' Sample: UNION inside TYPE
TYPE Value
    kind AS LONG
    UNION
        intVal AS LONG
        floatVal AS SINGLE
    END UNION
END TYPE
FUNCTION PBMAIN() AS LONG
    DIM v AS Value
    v.kind = 1
    v.intVal = 12345
    PRINT "Integer value:"; v.intVal
    v.floatVal = 3.14
    PRINT "Float value:"; v.floatVal
    FUNCTION = 0
END FUNCTION
