home *** CD-ROM | disk | FTP | other *** search
- ' GETDATA.BAS
- ' This subprogram returns a string of length nc% from the screen
- ' starting at location r%, c%. Before return, the string is
- ' stripped of spaces, control characters, and the sc% character.
-
- SUB getData (r%, c%, nc%, D$, sc%) STATIC
- r1% = r%: c1% = c%
- D$ = ""
- FOR i% = 1 to nc%
- x% = SCREEN(r1%, c1%)
- IF x% = sc% THEN
- D$ = D$ + " "
- ELSE
- D$ = D$ + CHR$(x%)
- END IF
- c1% = c1% + 1
- IF c1% > 80 THEN c1% = c1% - 80: r1% = r1% + 1
-
- NEXT i%
-
- i% = 3 ' strip from both ends
- CALL STRIPBLANKS(D$, i%, nc%) ' new length in nc%
- D$ = LEFT$(D$, nc%)
-
- END SUB
-