' Basic TYPE/END TYPE structure definition and field access
#COMPILE EXE
#DIM ALL

TYPE Person
    sName AS STRING
    age AS LONG
    height AS SINGLE
END TYPE

FUNCTION PBMAIN() AS LONG
    LOCAL p AS Person
    LOCAL s AS STRING

    p.sName = "John Doe           "
    p.age = 30
    p.height = 1.85

    s = p.sName
    PRINT "Name:"; TRIM$(s)
    PRINT "Age:"; p.age
    PRINT "Height:"; p.height
    PRINT "4:"; 4

    PRINT "TYPE operations complete."

    FUNCTION = 0
END FUNCTION
