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

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

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

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

    s = p.name
    PRINT "Name:"; TRIM$(s)
    PRINT "Age:"; p.age
    PRINT "Height:"; p.height
    PRINT "SIZEOF(Person):"; SIZEOF(p)

    PRINT "TYPE operations complete."

    FUNCTION = 0
END FUNCTION
