ex.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
LSET and RSET Statements Example
                        ◄Example►                ◄Contents►  ◄Index►  ◄Back►
──────────────────────────────────────────────────────────────────────────────
' This example uses the LSET and RSET statements to assign values to fixed-
' and variable-length strings.
 
' To try this example:
' 1. Choose New Project from the File menu
' 2. Copy the code example below to the code window
' 3. Press F5 to run the example
 
 DIM TmpStr2 AS STRING * 25
 
 CLS                                   ' Clear the 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"