home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
N_B_V203.ZIP
/
BASE-26.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
2KB
|
48 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1996-02-08 ╟─╖
│ │ FILE NAME BASE-26 .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-NB03.INC"
COLOR 7, 0
CLS
? "┌─────────────────────────────────────────────────────────────────────
? "│ fBase26$( Number% ) Number% => 1 and =< 676
? "├─────────────────────────────────────────────────────────────────────
? "│ This little function converts decimal numbers into base 26 using
? "│ A->Z. It is handy when printing lists where item numbers could be
? "│ confused with some other number on the form. ie: An order form
? "│ could have a quantity field and a line number field next to each
? "│ other and 'AA 01' leads to less mistakes than '01 01' would.
? "└─────────────────────────────────────────────────────────────────────
Row% = 10
Col% = 1
Start% = 0
FOR N% = Start% TO 677
LOCATE Row%, Col%
PRINT USING$( "###=", N% ); fBase26$(N%); "│";
INCR Row%
IF Row% = 26 THEN
Row% = 10
INCR Col%, 7
IF Col% > 72 THEN EXIT FOR
END IF
NEXT