home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
N_B_V203.ZIP
/
CHR2MID$.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
2KB
|
49 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME CHR2MID$.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-NB01.INC"
COLOR 7,0
CLS
? "┌───────────────────────────────────────────────────────────
? "│ CHR2MID ( V$, MidPos%, Char? )
? "├──────────────────────────────────────────────────────────────
? "│ This is yet another of those very specialized little things
? "│ that do a big job quickly and efficiently.
? "│ Instead of MID$( V$, 10, 1 ) = CHR$( 32 )
? "│ you use CHR2MID V$, 10, 32
? "│ and save both time and typing!
? "└─────────────────────────────────────────────────────────────────────
V$ = "This is a test>"
PRINT V$
PRINT
MTIMER
CHR2MID V$, 15, 46
DASoft = MTIMER
PRINT V$
PRINT USING "ELAPSED TIME: DASoft =###m/sec"; DASoft
PRINT
MTIMER
MID$( V$, 15, 1 ) = CHR$( 62 )
PBasic = MTIMER
PRINT V$
PRINT USING "ELAPSED TIME: PBasic =###m/sec"; PBasic