' TYPEDEF for base types and PTR types
#COMPILE EXE
#DIM ALL

TYPE Person
    sName AS STRING
    age AS LONG
END TYPE

' Use LONG directly instead of MyLong
' Use Person instead of TPerson
FUNCTION PBMAIN() AS LONG
    LOCAL ml AS LONG
    LOCAL p AS Person
    LOCAL n AS STRING

    ml = 42
    PRINT "MyLong value:"; ml

    p.sName = "Bob                    "
    p.age = 25
    n = p.sName
    PRINT "TPerson sName:"; TRIM$(n)
    PRINT "TPerson age:"; p.age

    PRINT "4:"; 4

    PRINT "TYPEDEF operations complete."

    FUNCTION = 0
END FUNCTION
