' String Build — SPACE$, STRING$, REPEAT$, BUILD$
#COMPILE EXE
#DIM ALL

FUNCTION PBMAIN() AS LONG
    LOCAL result AS STRING

    result = SPACE$(10)
    PRINT "SPACE$(10):    '" + result + "'"
    PRINT "LEN = " + STR$(LEN(result))
    PRINT

    result = STRING$(8, 42)
    PRINT "STRING$(8, 42):'" + result + "' (8 asterisks)"

    result = STRING$(5, "A")
    PRINT "STRING$(5,A):  '" + result + "'"
    PRINT

    result = REPEAT$("Hello", 3)
    PRINT "REPEAT$(Hello,3): " + result
    PRINT

    result = BUILD$("The", "quick", "brown", "fox")
    PRINT "BUILD$(...):     " + result

    result = BUILD$("Year: ", "2026", "-", "Month: ", "06")
    PRINT "BUILD$ mixed:    " + result

    FUNCTION = 0
END FUNCTION
