Business Shell (BUSH) Guide
Author: Ken Burtch

Home Page | Introduction | Tutorials | Reference | Packages | Hacking

Packages
4.1 Using Packages
4.2 text_io (Console I/O)
4.3 text_io (File I/O)
4.4 sound
4.5 source_info
4.6 System
4.7 numerics
4.8 strings
4.9 command_line
4.10 lock_files
4.11 cgi
4.12 calendar
4.13 units
4.14 arrays
4.15 files
4.16 db (Database)
4.17 stats
4.18 pen
4.19 mysql
4.20 os
4.21 directory_operations
| This part of the guide contains detailed descriptions of the BUSH built-in packages. ### 4.13 Units Package r := units.inches2mm( f )
Converts inches to millimeters. Example: ml := units.inches2mm( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of millimeters
f | in | long float | required | the number of inches
r := units.mm2inches( f )
Converts millimeters to inches. Example: in := units.mm2inches( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of inches
f | in | long float | required | the number of millimeters
r := units.feet2cm( f )
Converts feet to centimeters. Example: cm := units.feet2cm( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of centimeters
f | in | long float | required | the number of feet
r := units.cm2feet( f )
Converts centimeters to feet. Example: ft := units.cm2feet( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of feet
f | in | long float | required | the number of centimeters
r := units.yards2m( f )
Converts yards to meters. Example: m := units.yards2m( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of meters
f | in | long float | required | the number of yards
r := units.m2yards( f )
Converts meters to yards. Example: yd := units.m2yards( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of yards
f | in | long float | required | the number of meters
r := units.miles2km( f )
Converts miles to kilometers. Example: km := units.miles2km( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of kilometers
f | in | long float | required | the number of miles
r := units.km2miles( f )
Converts kilometers to miles. Example: mi := units.km2miles( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of miles
f | in | long float | required | the number of kilometers
r := units.ly2pc( f )
Converts lightyears to parsecs. Example: pc := units.ly2pc( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of parsecs
f | in | long float | required | the number of lightyears
r := units.pc2ly( f )
Converts parsecs to lightyears. Example: ly := units.pc2ly( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of lightyears
f | in | long float | required | the number of parsecs
r := units.sqin2sqcm( f )
Converts square inches to square centimeters. Example: cm2 := units.sqin2sqcm( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of square centimeters
f | in | long float | required | the number of square inches
r := units.sqcm2sqin( f )
Converts square centimeters to square inches. Example: in2 := units.sqcm2sqin( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of square inches
f | in | long float | required | the number of square centimeters
r := units.sqft2sqm( f )
Converts square feet to square meters. Example: m2 := units.sqft2sqm( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of square meters
f | in | long float | required | the number of square feet
r := units.sqm2sqft( f )
Converts square meters to square feet. Example: ft2 := units.sqm2sqft( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of square feet
f | in | long float | required | the number of square meters
r := units.sqyd2sqm( f )
Converts square yards to square meters. Example: m2 := units.sqyd2sqm( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of square meters
f | in | long float | required | the number of square yards
r := units.sqm2sqyd( f )
Converts square meters to square yards. Example: yd2 := units.sqm2sqyd( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of square yards
f | in | long float | required | the number of square meters
r := units.acres2hectares( f )
Converts acres to metric hectares. Example: h := units.acres2hectares( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of hectares
f | in | long float | required | the number of acres
r := units.hectares2acres( f )
Converts metric hectares to acres. Example: ac := units.hectares2acres( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of acres
f | in | long float | required | the number of hectares
r := units.sqkm2sqmiles( f )
Converts square kilometers to square miles. Example: mi2 := units.sqkm2sqmiles( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of square miles
f | in | long float | required | the number of square kilometers
r := units.sqmiles2sqkm( f )
Converts square miles to square kilometers. Example: km2 := units.sqmiles2sqkm( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of square kilometers
f | in | long float | required | the number of square miles
r := units.oz2grams( f )
Converts imperial (British) ounces to grams. Example: g := units.oz2grams( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of grams
f | in | long float | required | the number of imperial ounces
r := units.grams2oz( f )
Converts grams to imperial (British) ounces. Example: oz := units.grams2oz( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of imperial ounces
f | in | long float | required | the number of grams
r := units.lb2kg( f )
Converts pounds (weight) to kilograms. Example: kg := units.lb2kg( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of kilograms
f | in | long float | required | the number of pounds
r := units.kg2lb( f )
Converts kilograms to pounds (weight). Example: lb := units.kg2lb( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of pounds
f | in | long float | required | the number of kilograms
r := units.tons2tonnes( f )
Converts tons to metric tonnes. Example: mt := units.ton2tonnes( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of tonnes
f | in | long float | required | the number of tons
r := units.tonnes2tons( f )
Converts metric tonnes to tons. Example: t := units.tonnes2tons( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of tons
f | in | long float | required | the number of tonnes
r := units.floz2ml( f )
Converts imperial (British) fluid ounces to milliliters. Example: ml := units.floz2ml( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of milliliters
f | in | long float | required | the number of imperial fluid ounces
r := units.ml2floz( f )
Converts milliliters to imperial (British) fluid ounces. Example: floz := units.ml2floz( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of imperial fluid ounces
f | in | long float | required | the number of milliliters
r := units.usfloz2ml( f )
Converts U.S. fluid ounces to milliliters. Example: ml := units.usfloz2ml( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of milliliters
f | in | long float | required | the number of U.S. fluid ounces
r := units.ml2usfloz( f )
Converts milliliters to U.S. fluid ounces. Example: floz := units.ml2usfloz( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of U.S. fluid ounces
f | in | long float | required | the number of milliliters
r := units.usfloz2floz( f )
Converts U.S. fluid ounces to imperial (British) fluid ounces. Example: floz := units.usfloz2floz( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of imperial fluid ounces
f | in | long float | required | the number of U.S. fluid ounces
r := units.floz2usfloz( f )
Converts imperial (British) fluid ounces to U.S. fluid ounces. Example: usfloz := units.floz2usfloz( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of U.S. fluid ounces
f | in | long float | required | the number of imperial fluid ounces
r := units.pints2l( f )
Converts imperial (British) pints to metric liters. Example: liters := units.pints2l( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of liters
f | in | long float | required | the number of imperial pints
r := units.l2quarts( f )
Converts metric liters to imperial (British) quarts. Example: quarts := units.l2quarts( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of imperial quarts
f | in | long float | required | the number of liters
r := units.gal2l( f )
Converts imperial (British) gallons to metric liters. Example: liters := units.gal2l( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of liters
f | in | long float | required | the number of imperial gallons
r := units.l2gal( f )
Converts metric liters to imperial (British) gallons. Example: gals := units.l2gal( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of imperial gallons
f | in | long float | required | the number of liters
r := units.cucm2floz( f )
Converts metric cubic centimeters to imperial (British) fluid ounces. Example: floz := units.cucm2floz( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of imperial fluid ounces
f | in | long float | required | the number of cubic centimeters
r := units.oz2cucm( f )
Converts imperial (British) fluid ounces to cubic centimeters. Example: cm3 := units.floz2cucm( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of cubic centimeters
f | in | long float | required | the number of imperial fluid ounces
r := units.cucm2usfloz( f )
Converts metric cubic centimeters to U.S. fluid ounces. Example: floz := units.cucm2usfloz( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of U.S. fluid ounces
f | in | long float | required | the number of cubic centimeters
r := units.usfloz2cucm( f )
Converts U.S. fluid ounces to cubic centimeters. Example: cm3 := units.usfloz2cucm( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the number of cubic centimeters
f | in | long float | required | the number of U.S. fluid ounces
r := units.f2c( f )
Converts Fahrenheit temperatures to Celsius. Example: celcius := units.f2c( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the degrees in Celcius
f | in | long float | required | the degrees in Fahrenheit
r := units.c2f( f )
Converts Celcius temperatures to Fahrenheit. Example: fahren := units.c2f( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the degrees in Fahrenheit
f | in | long float | required | the degrees in Celcius
r := units.k2c( f )
Converts Kelvin temperatures to Celsius. Example: celcius := units.k2c( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the degrees in Celcius
f | in | long float | required | the degrees in Kelvin
r := units.c2k( f )
Converts Celcius temperatures to Kelvin. Example: kelvin := units.c2k( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the degrees in Kelvin
f | in | long float | required | the degrees in Celcius
r := units.bytes2mb( f )
Converts bytes to megabytes. Example: kelvin := units.bytes2mb( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the amount in megabytes
f | in | long float | required | the amount in bytes
r := units.mb2bytes( f )
Converts megabytes to bytes. Example: bytes := units.mb2bytes( 5.5 ); Ada Equivalent: none (BUSH extension) Parameters:
r | return value | long float | required | the amount in bytes
f | in | long float | required | the amount in megabytes
Back to Top