home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
N_B_V203.ZIP
/
TPRNTTXT.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
3KB
|
50 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME TPRNTTXT.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
? "┌─────────────────────────────────────────────────────────────────────────
? "│ TprintLine ( Row?,Col?, Cols?,Text$,MidPos%,CrLf??,TabW?,Attr? )
? "│ fTprintLine% ( Row?,Col?, Cols?,Text$,MidPos%,CrLf??,TabW?,Attr? )
? "│ TprintText ( Row?,Col?,Rows?,Cols?,Text$,MidPos%,CrLf??,TabW?,Attr? )
? "│ fTprintText% ( Row?,Col?,Rows?,Cols?,Text$,MidPos%,CrLf??,TabW?,Attr? )
? "├─────────────────────────────────────────────────────────────────────────
? "│ Printing and displaying texts no longer needs to be the arduous ordeal it
? "│ once was. These two powerful routines handle the problem with ease. The
? "│ functions return the next that will be required for MidPos%. TabW? is
? "│ the number of spaces a TAB or CHR$(9) is to be expanded to. If you send
? "│ ZERO then the CHR$(9)'s will be printed. Rows? and Cols? define the
? "│ bottom and right side of the line and/or box being printed into.
? "└─────────────────────────────────────────────────────────────────────────
Text$ = "Mary had a little lamb." + CHR$( 13, 10) +_
"It's fleece was white as snow." + CHR$(&h0D,&h0A) +_ ' GET IT?
"And every where that Mary went" + CHR$( 13, 10) +_
"The lamb was sure to go."
L% = LEN( Text$ )
R? = 16
DO
MidPos% = fTprintLine%( R?, 1, 39, Text$, MidPos%, &h0D0A, 0, 112 )
INCR R?, 1
LOOP UNTIL ( MidPos% > L% ) OR ( R? = 26 )
Rows? = 5
X% = fTprintTEXT%( 16, 41, Rows?, 39, Text$, 1, &h0D0A, 0, 31 )
Tprint 25, 1, "An original poem by Anon!", 14