home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
N_B_V203.ZIP
/
READSCRN.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
3KB
|
47 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME READSCRN.DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
$INCLUDE "DAS-NBT1.INC"
COLOR 7, 0
CLS
? "┌────────────────────────────────────────────────────────────────────────
? "│ fReadSCREEN$ ( Row?, Col?, Cols? )
? "├─────────────────────────────────────────────────────────────────────────────
? "│ Pulls the text out of screen memory. The function will read past the end of
? "│ the line. It will NOT automatically stop when it has reached the end of
? "│ the screen.
? "└─────────────────────────────────────────────────────────────────────────────
'┌────────────────────────────
TBoxFILL 10, 2, 15, 78, 177, 15 '│ fill the screen with ▒'s
TBoxDRAW 16, 24, 3, 34, 1, 15 '│ 3 display boxes
TBoxDRAW 11, 24, 3, 34, 2, 15 '│
TBoxDRAW 21, 24, 3, 34, 2, 15 '│
D$ = " READ THIS TEXT FROM THE SCREEN " '│ our test string
Tprint 17, 25, D$, 12 '│ print in box 1
'└───────────────────────────┐
GotText$ = fReadSCREEN$ ( 17, 25, 32 ) ' you can do this! │
'┌───────────────────────────┘
Tprint 12, 25, GotText$, 14 '│
'└───────────────────────────┐
S$ = SPACE$( 32 ) '─┐ │
FOR Col? = 25 TO 56 ' │ │
Char? = SCREEN ( 17, Col? ) ' ├─ or all of this! │
MID$( S$, (Col?-24),1 ) = CHR$(Char?) ' │ │
NEXT '─┘ │
'┌───────────────────────────┘
Tprint 22, 25, S$, 09 '└────────────────────────────