[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BASIC Ci to Bq program
Remember the computer language BASIC?
I developed this BASIC program for our shipping people to enter the Ci units
and get the appropriate BQ unit for shipping papers.
Feel free to use it at your own risk.
Enough, already!
Lew
Off-work internet: http://home.pacbell.net/cookl/
= = = = = = =
REM THIS PROGRAM WAS WRITTEN TO CONVERT FROM CURIE UNITS TO SI UNITS FOR
SHIPPING PURPOSES.
REM NO CLAIM OF ACCURACY IS MADE. USE AT YOUR OWN RISK
CLS : COLOR 14, 5, 15:
FOR SCRX = 1 TO 30:
PRINT "
"
NEXT SCRX
CLS
PRINT "DOT Radioactivity Conversion Calculation
"
PRINT
PRINT "This is a simple program which converts Curie units to Becquerels.
"
PRINT "For further information or to report problems, call";
COLOR 15, 5, 15:
PRINT " Lew Cook";
COLOR 14, 5, 15:
PRINT " at "
PRINT "Chevron Research CTN/510 242-7040 or E-mail LCOO@chevron.com
"
1 PRINT
PRINT "Enter the UNITS used for radioactivity in Curie units
"
PRINT
PRINT " ";
COLOR 15, 5, 15: PRINT "p";
COLOR 14, 5, 15:
PRINT " = picoCuries "
PRINT " ";
COLOR 15, 5, 15: PRINT "n";
COLOR 14, 5, 15:
PRINT " = nanoCuries "
PRINT " ";
COLOR 15, 5, 15: PRINT "u";
COLOR 14, 5, 15:
PRINT " = microCuries "
PRINT " ";
COLOR 15, 5, 15: PRINT "m";
COLOR 14, 5, 15:
PRINT " = milliCuries "
PRINT " ";
COLOR 15, 5, 15: PRINT "c";
COLOR 14, 5, 15:
PRINT " = Curies "
INPUT " "; UNITZ$
IF UNITZ$ = "p" OR UNITZ$ = "P" THEN 100
IF UNITZ$ = "n" OR UNITZ$ = "N" THEN 200
IF UNITZ$ = "u" OR UNITZ$ = "U" THEN 300
IF UNITZ$ = "m" OR UNITZ$ = "M" THEN 400
IF UNITZ$ = "c" OR UNITZ$ = "C" THEN 500
IF UNITZ$ = "" THEN 999
100 CIUN$ = "picoCuries ": multip = 1: GOTO 600
200 CIUN$ = "nanoCuries ": multip = 1000: GOTO 600
300 CIUN$ = "microCuries ": multip = 1000000: GOTO 600
400 CIUN$ = "milliCuries ": multip = 1000000000: GOTO 600
500 CIUN$ = "Curies ": multip = 1000000000000#: GOTO 600
600 PRINT
PRINT " What is the NUMBER of "; CIUN$;
INPUT " you want to convert to Becquerels ?"; NCI
IF NCI = 0 THEN 999
bq = multip * NCI / 27.027027#
bqu$ = "Bq (Becquerels)"
bqd = 1
PRINT " "
IF bq > 1000# THEN bqd = 1000#
IF bq > 1000000# THEN bqd = 1000000#
IF bq > 1000000000# THEN bqd = 1000000000#
IF bq > 1000000000000# THEN bqd = 1000000000000#
IF bq > 1000# THEN bqu$ = "KBq (kiloBecquerels) "
IF bq > 1000000# THEN bqu$ = "MBq (MegaBecquerels) "
IF bq > 1000000000# THEN bqu$ = "GBq (GigaBecquerels) "
IF bq > 1000000000000# THEN bqu$ = "TBq (TeraBecquerels) "
PRINT NCI; CIUN$; " equals "; bq / bqd; bqu$
PRINT " "
COLOR 30, 5, 15:
PRINT " Report as ";
COLOR 15, 5, 15:
PRINT USING "###.##"; bq / bqd; : PRINT " ";
PRINT USING "\ \"; bqu$: PRINT
COLOR 14, 5, 15:
INPUT "Hit enter to do another or any other key + ENTER to quit", morex$
IF morex$ = "" THEN GOTO 1 ELSE GOTO 999
999 END
************************************************************************
The RADSAFE Frequently Asked Questions list, archives and subscription
information can be accessed at http://www.ehs.uiuc.edu/~rad/radsafe.html