GEEK STUFF

Unlimited Domains • Raw Stat Logs • Counters • CGI-BIN • $4.95 mo.
SIGN UP FOR HostMonster.COM NOW
4NT Code Samples - Page 4
USER-DEFINED CONVERSION FUNCTIONS
This contains a number of user-defined conversion functions.
To use it put it in a file named conversions.fnc. From 4NT type FUNCTION /F conversions.fnc
That defines the functions.
Use a function like a batch-file variable that begins with @
Function parameters must be in square brackets, not parentheses.
| NAME |
INPUT |
RETURNS |
| MonthF |
two-digit month |
full month name |
| MyName |
-- |
the specified (full) name |
| Me |
-- |
the specified nickname |
| CircleArea |
circle diameter |
area of a circle |
|
Circumference
|
circle diameter |
circumference of a circle |
|
Ft2m
|
feet |
meters |
|
FtIn2m
|
feet <space> inches |
meters |
| M2Ft |
meters |
feet |
| M2In |
meters |
inches |
|
M2FtIn
|
meters |
feet' inches" |
|
In2m
|
inches |
meters |
|
Cm2In
|
centimeters |
inches |
|
In2Cm
|
inches |
centimeters |
|
Lb2Kg
|
pounds |
kilograms |
|
Kg2Lb
|
kilograms |
pounds |
|
F2C
|
Farenheit degrees |
Celsius degrees |
|
C2F
|
Celsius degrees |
Farenheit degrees |
| |
|
|
| |
|
|
| |
|
|
: by Joseph "Rick" Reinckens
: Please visit www.GodOnThe.Net
:
: This requires 4NT from www.JPSoft.com
: MONTHF MUST HAVE NO SPACES EXCEPT AFTER THE FUNCTION NAME!
Monthf %@if[%1=01,January]%@if[%1=02,February]%@if[%1=03,March]%@if[%1=04,
April]%@if[%1=05,May]%@if[%1=06,June]%@if[%1=07,July]%@if[%1=08,
August]%@if[%1=09,September]%@if[%1=10,October]%@if[%1=11,
November]%@if[%1=12,December]
MyName Your Name Here
Me Your Nickname
CircleArea %@eval[%1 * %1 * 3.1415926]
Circumference %@eval[%1 * 3.1415926]
Ft2m %@eval[%1 * .3048]
FtIn2m %@eval[(%1 * 12 + %2) / 39.3700787]
M2Ft %@eval[%1 * 3.2808399]
M2In %@eval[%1 * 39.3700787]
M2FtIn %@eval[((%1 * 3.2808399) \ 1)]' %@eval[(%1 * 3.2808399 mod 12)]"
In2m %@eval[%1 / 39.3700787]
Cm2In %@eval[%1 * .393700787]
In2Cm %@eval[%1 * 2.54]
Lb2Kg %@eval[%1 * 0.45359237]
Kg2Lb %@eval[%1 * 2.20462262]
F2C %@eval[(%1-32)*5/9]
C2F %@eval[%1*9/5+32]
Check_Date %@instr[1, 8, %1]
Check_Num %@instr[1, 4, %2]