#COMPILE EXE "followup_features.exe"
#DIM ALL

TYPE Rec
    id AS LONG
    amount AS DOUBLE
END TYPE

TYPE Named
    name AS STRING * 32
    id AS LONG
END TYPE

CALLBACK FUNCTION TimerProc(BYVAL hwnd AS QUAD, BYVAL msg AS QUAD, BYVAL id AS QUAD, BYVAL ticks AS QUAD) AS LONG
    FUNCTION = 0
END FUNCTION

FUNCTION PBMAIN() AS LONG
    LOCAL s() AS STRING
    LOCAL rec AS Rec
    LOCAL copy AS Rec
    LOCAL items(1 TO 2) AS Rec
    LOCAL named AS Named
    LOCAL fixed AS STRING * 80
    LOCAL p AS QUAD
    LOCAL r AS STRING

    REDIM s(1 TO 3) AS STRING
    s(1) = "alpha"
    s(2) = "beta"
    named.name = "bob"
    fixed = "local fixed string syntax"
    rec.id = 7
    rec.amount = 3.5
    items(1) = rec
    copy = items(1)

    OPEN "followup.bin" FOR BINARY AS #1
    PUT #1, 1, s(1)
    PUT #1, , rec
    SEEK #1, 1
    GET #1, 1, r
    CLOSE #1

    p = CODEPTR(TimerProc)
    FUNCTION = LEN(r) + LEN(fixed) + p
END FUNCTION
