◄Example► ◄Contents► ◄Index► ◄Back► ────────────────────────────────────────────────────────────────────────────── 'This example uses the LSET and RSET statements to assign values to fixed- 'and variable-length strings. DIM TmpStr2 AS STRING * 25 CLS 'Clear screen. 'Use RSET on variable-length string with a value. TmpStr$ = SPACE$(40) PRINT "Here are two strings that have been right and left " PRINT "justified in a 40-character variable-length string." PRINT RSET TmpStr$ = "Right-|" PRINT TmpStr$ LSET TmpStr$ = "|-Left" PRINT TmpStr$ PRINT "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" PRINT "12345678901234567890123456789012345678901234567890" PRINT " 1 2 3 4 5" 'Use RSET on fixed-length string of length 25. PRINT PRINT PRINT "Here are two strings that have been right and left" PRINT "justified in a 25-character fixed-length string." PRINT RSET TmpStr2 = "Right-|" PRINT TmpStr2 LSET TmpStr2$ = "|-Left" PRINT TmpStr2$ PRINT "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" PRINT "12345678901234567890123456789012345678901234567890" PRINT " 1 2 3 4 5"