* *
*
* * News
 • Daily news
 • Archived news

Columns
 • WildCard
 • Qbasic Articles
 • QB Comic!

Learning center
 • QB Books
 • Qbasic Lessons!
 • Qbasic FAQ
 • Newbies Section
 • Qbasic Tutorials

* *
*
*
*
*  
.RSET Statement Programming Example.

  QuickSCREEN      Details     Example      Contents      Index
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
RSET Statement Programming Example
This example shows the effects of using RSET to assign values to
fixed- and variable-length strings.
 
DIM TmpStr2 AS STRING * 10
CLS    ' Clear screen
PRINT "         1         2         3"
PRINT "123456789012345678901234567890"
' Use RSET on null variable-length string of length.
' Nothing prints because TmpStr$ is a zero-length field.
TmpStr$ = ""
RSET TmpStr$ = "Another"
PRINT TmpStr$
' Use RSET on variable-length string with a value.
TmpStr$ = SPACE$(20)
RSET TmpStr$ = "Another"
PRINT TmpStr$
' Use RSET on fixed-length string of length 10.
RSET TmpStr2 = "Another"
PRINT TmpStr2
 
Sample Output
 
         1         2         3
123456789012345678901234567890
 
             Another
   Another
 
* * ** * * * *