home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
N_B_V203.ZIP
/
FAGE.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
2KB
|
41 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME FAGE .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-NB02.INC"
COLOR 7,0
CLS
? "┌────────────────────────────────────────────────────────────────
? "│ fAge% ( BirthDate$ )
? "├───────────────────────────────────────────────────────────────────
? "│ A simple little routine to compute elapsed whole years since
? "│ BirthDate$. Give it a try!
? "│ All it does is reduce the incoming string into a WORD, subtract the
? "│ WORD from today's value, multiply by 4 then divide by 1461! Simple!
? "│ Age% = ( 4 * ( Today?? - BirthDate?? ) ) \ 1461
? "└─────────────────────────────────────────────────────────────────────
BirthDate$ = "12-26-1947"
' BirthDate$ = "02-30-1947" ' a bad date un-rem it to see...
PRINT
PRINT "Your birthdate is: "; BirthDate$
PRINT " Today is: "; fSYSDate$
PRINT
PRINT " That makes you:" ; fAge%( BirthDate$ ); "years old"