Program based on LEFT$ expression using function
Declare function  pattern$(a$)
CLS
INPUT "Enter a string"; a$
PRINT pattern$(a$)
END
FUNCTION pattern$ (a$)
    FOR i = LEN(a$) TO 1 STEP -1
        PRINT LEFT$(a$, i)
    NEXT i
END FUNCTION