home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
N_B_V203.ZIP
/
TPRINTN.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
4KB
|
62 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME TPRINTN .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" ' use "DAS-NBT0.INC" for mouse support
WIDTH 80,25 ' CHANGE 25 TO 43 or 50
SCREEN 0,,1,1 ' Apage = 1 and Vpage = 1
COLOR 7, 0
CLS
? "┌───────────────────────────────────────────────────────────────────────
? "│ TprintN ( Row?, Col?, V$, Attr? )
? "│ fTprintN?? ( Row?, Col?, V$, Attr? )
? "├─────────────────────────────────────────────────────────────────────────
? "│ Before going into all the cousins to this routine it is important to know
? "│ what is going on here as they all work the same with some added feature.
? "│ 1. the cursor is NOT effected []
? "│ 2. the COLOR command has no effect and is not effected
? "│ 3. the screen will NOT scroll
? "│ 4. you cannot (are not allowed to) print past the end of the screen
? "│ 5. you can NOT change the color attribute in the middle of the string
? "│ 6. printing can be done using the current attribute(s) found on the screen
? "├─────────────────────────────────────────────────────────────────────────────
? "│ Unlike Tprint (et al) this routine does not change attributes in the
? "│ middle of the strings. This makes it handy to print littorals.
? "└─────────────────────────────────────────────────────────────────────────────
LOCATE 7,34,1,15,16
Text$ = " This is a test. " : TprintN 17, 1, Text$, 30 ' yellow on blue
TprintN 18, 1, Text$, 0 ' screen's attr
Text$ = " This is a test. " : TprintN 19, 1, Text$, 30 ' change attrs
TprintN 21, 1, STRING$(2000,65), 112 ' past the end
MAP A$$ * 13, 6 AS A1$$, 2 AS A2$$, 5 AS A3$$
A1$$ = "HELLO"
A2$$ = CHR$(17,31)
A3$$ = "WORLD"
TprintN 22, 13, A$$, 30
TYPE JunkTYPE ' TprintN can be used to print
A AS STRING * 6 ' literal strings, functions,
T AS STRING * 2 ' types and just about anything
B AS STRING * 5 ' that is translated into a string
END TYPE ' by PowerBASIC. This phenomenon
DIM tT AS JunkTYPE ' is NOT shared by most of it's
tT.A = "HELLO " ' cousins as it is both space and
tT.T = CHR$(17,31) ' time consuming. Further it is,
tT.B = "WORLD" ' for the best part, unnecessary
TprintN 23, 13, tT, 30 ' for the other routines