FreeAdhocUDF for InterBase and FireBird in deutschin englishen français
homeprevious pageÜbersicht • overview • aperçunext pagelast page mailing-listwas ich vermisse • what I missed •eMail Kommentar • eMail commentprint
 

Functions enclosed in FreeAdhocUDF.dll/.so/.dylib :
Converting functions 142 functions

Length units 22 functions

Area units 12 functions

Volume units 30 functions

Weight units 16 functions

Temperature units 2 functions

Date/Time units 6 functions

Technical units 26 functions

   - magnetism 2 functions

   - pressure 8 functions

   - energy / work 4 functions

   - power 4 functions

   - speed 4 functions

   - consumption 8 functions

nautical units 14 functions

Number systems 8 functions

Geometrical transformations 2 functions


Output RETURN mechanism if nothing other is published: FREE_IT
TestSQLs with NULL run only in FireBird 2.0
 
Input ever DOUBLE
Output ever DOUBLE
Entrypoints like functions-name without F_C_ in lowercase - all functions kompatible with UTF-8

Converting functions: Length units
convert in SI-units all functions from adhoc
F_C_P2MM
F_C_IN2M
F_C_LI2M
F_C_FT2M
F_C_YD2M
F_C_FM2M
F_C_RD2M
F_C_CH2M
F_C_FUR2M
F_C_LEA2KM
F_C_MILE2KM
typograph. point to millimeter
inch to meter
link to meter
feet to meter
yard to meter
fathom to meter
rod to meter
chain to meter
furlong to meter
league to meter
miles to kilometer
convert from SI-units all functions from adhoc
F_C_MM2P
F_C_M2IN
F_C_M2LI
F_C_M2FT
F_C_M2YD
F_C_M2FM
F_C_M2RD
F_C_M2CH
F_C_M2FUR
F_C_KM2LEA
F_C_KM2MILE
millimeter to typograph.point
meter to inch
meter to link
meter to feet
meter to yard
meter to fathom
meter to rod
meter to chain
meter to furlong
kilometer to league
kilometer to miles
nach oben • go top •
 
Converting functions: Area units
convert in SI-units all functions from adhoc
F_C_AR2SQM
F_C_HA2SQM
F_C_MORGEN2SQM
F_C_SQFT2SQM
F_C_AC2SQM
F_C_SQYD2SQM
Ar to squaremeter
Hektar to squaremeter
Morgen to squaremeter
squarefeet to squaremeter
Acre to squaremeter
squareyard to squaremeter
convert from SI-units all functions from adhoc
F_C_SQM2AR
F_C_SQM2HA
F_C_SQM2MORGEN
F_C_SQM2SQFT
F_C_SQM2AC
F_C_SQM2SQYD
squaremeter to Ar
squaremeter to Hektar
squaremeter to Morgen
squaremeter to squarefeet
squaremeter to Acre
squaremeter to squareyard
nach oben • go top •
 
Converting functions: Volume units
convert in SI-units all functions from adhoc
F_C_CUIN2CUM
F_C_CUFT2CUM
F_C_CUYD2CUM
F_C_CUP2ML
F_C_GBFLOZ2ML

F_C_USFLOZ2ML
F_C_GBPT2L
F_C_USPT2L
F_C_GBQT2L
F_C_USQT2L
F_C_GBGAL2L
F_C_USGAL2L
F_C_BBL2L
F_C_GBBU2L
F_C_USBU2L

cubic inch to cubic meter
cubic foot to cubic meter
cubic yard to cubic meter
Cup (8 onces) to millilitre
GB fluid once to millilitre
US fluid ounce to millilitre
GB pint to litre
US pint to litre
GB quart to litre
US quart to litre           
GB gallons to litre
US gallons to litre
barrel to litre
GB bushel to litre
US bushel to litre
convert from SI-units all functions from adhoc
F_C_CUM2CUIN
F_C_CUM2CUFT
F_C_CUM2CUYD
F_C_ML2CUP
F_C_ML2GBFLOZ

F_C_ML2USFLOZ
F_C_L2GBPT
F_C_L2USPT
F_C_L2GBQT
F_C_L2USQT
F_C_L2GBGAL
F_C_L2USGAL
F_C_L2BBL
F_C_L2GBBU
F_C_L2USBU

cubic meter to cubic inch
cubic meter to cubic foot
cubic meter to cubic yard
millilitre to Cup (8 onces)
millilitre to GB fluid once   
millilitre to US fluid once
litre to GB pint
litre to US pint
litre to GB quart
litre to US quart
litre to GB gallons
litre to US gallons
liter to barrel
litre to GB bushel
litre to US bushel
nach oben • go top •
 
Converting functions: Weight units
convert in SI-units all functions from adhoc
F_C_CT2G
F_C_OZ2G
F_C_OZTR2G

F_C_CWT2G
F_C_ST2G
F_C_LB2KG
F_C_OBU2G
F_C_DRA2G

carat to gramme
ounce to gramme
troy ounce to gramme
hundredweight (cental) to gramme
stone to gramme
pound to kilogramme
Obulus (ancient world) to gramme
Drachme (ancient world) to gramme
convert from SI-units all functions from adhoc
F_C_G2CT
F_C_G2OZ

F_C_G2OZTR
F_C_G2CWT
F_C_G2ST
F_C_KG2LB

F_C_G2OBU
F_C_G2DRA

gramme to carat
gramme to ounce
gramme to troy ounce
gramme to hundredweight (cental)
gramme to stone
kilogramme to pound
gramme to Obulus
gramme to Drachme
nach oben • go top •
 
Converting functions: Temperature units
convert in SI-units all functions from adhoc
F_C_F2C degree Fahrenheit to degree Celsius
convert from SI-units all functions from adhoc
F_C_C2F
degree Celsius to degree Fahrenheit
nach oben • go top •
 
Converting functions: Date/Time units
convert in SI-units all functions from adhoc
F_C_TIME2DECTIME
F_C_TIME2INDTIME
time to decimal-time
time to industrial time (rounded seconds to minutes)
convert from SI-units all functions from adhoc
F_C_DECTIME2TIME
F_C_INDTIME2TIME
decimal-time to time
industrial time to time
Test SQL
SELECT 17.45 AS ISCORRECT, F_C_TIME2DECTIME('03.11.2008 17:27:00') FROM RDB$DATABASE;
SELECT 0 AS ISCORRECT, F_C_TIME2DECTIME(CURRENT_DATE) FROM RDB$DATABASE;
SELECT NULL AS ISCORRECT, F_C_TIME2DECTIME(NULL) FROM RDB$DATABASE;
SELECT '17:27:00' AS ISCORRECT, F_C_DECTIME2TIME(17.45) FROM RDB$DATABASE;
SELECT '17:27:18' AS ISCORRECT, F_C_DECTIME2TIME(17.455) FROM RDB$DATABASE;
SELECT '17:27:19' AS ISCORRECT, F_C_DECTIME2TIME(17.4552777) FROM RDB$DATABASE;
SELECT '17:27:30' AS ISCORRECT, F_C_DECTIME2TIME(17.45833333) FROM RDB$DATABASE;
SELECT '17:54:00' AS ISCORRECT, F_C_DECTIME2TIME(17.90) FROM RDB$DATABASE;
SELECT '00:00:00' AS ISCORRECT, F_C_DECTIME2TIME(0) FROM RDB$DATABASE;
SELECT NULL AS ISCORRECT, F_C_DECTIME2TIME(NULL) FROM RDB$DATABASE;
SELECT 17.45 AS ISCORRECT, F_C_TIME2INDTIME('03.11.2008 17:27:00') FROM RDB$DATABASE;
SELECT 17.45 AS ISCORRECT, F_C_TIME2INDTIME('03.11.2008 17:27:29') FROM RDB$DATABASE;
SELECT 17.46 AS ISCORRECT, F_C_TIME2INDTIME('03.11.2008 17:27:30') FROM RDB$DATABASE;
SELECT '17:27:00' AS ISCORRECT, F_C_INDTIME2TIME(17.4580555555556) FROM RDB$DATABASE;
SELECT '17:28:00' AS ISCORRECT, F_C_INDTIME2TIME(17.4583333333333) FROM RDB$DATABASE;
nach oben • go top •
convert to and from UTC all functions from adhoc
F_LOCAL2UTC
F_UTC2LOCAL
local timestamp (Date and Time) convert to UTC (universal time code)
UTC (universal time code) convert to local timestamp (Date and Time)
Input TIMESTAMP
Output TIMESTAMP

nach oben • go top •
 
Converting functions: technical units
magnetism all functions from adhoc
F_C_G2T
F_C_T2G
Gauss to Tesla
Tesla to Gauss
pressure all functions from adhoc
F_C_BAR2TORR
F_C_BAR2PA
F_C_PSI2PA
F_C_TORR2PA
F_C_TORR2BAR
F_C_PA2BAR
F_C_PA2PSI
F_C_PA2TORR
bar to Torr
bar to Pascal
psi (pound per squarinch) to Pascal
Torr to Pascal
Torr to bar
Pascal to bar
Pascal to psi (pound per squarinch)
Pascal to Torr
energy / worg all functions from adhoc
F_C_CAL2J
F_C_J2CAL
F_C_LBFT2NM
F_C_NM2LBFT

Kalorie to Joule
Joule to Kalorie
pounds-feet to newtonmeter
newtonmeter to pounds-feet
power all functions from adhoc
F_C_PS2KW
F_C_BHP2KW
F_C_KW2PS
F_C_KW2BHP
metric horsepower PS to KiloWatt
British Horsepower (= SAE-HP) to KiloWatt
KiloWatt to metric horsepower PS 
KiloWatt to British Horsepower (= SAE-HP)
speed all functions from adhoc
F_C_MPH2KMPH
F_C_FPS2MPS
F_C_KMPH2MPH
F_C_MPS2FPS
mph (miles per hour) to kilometer per hour
foot per seconds to meter per seconds
kilometer per hour to mph (miles per hour)
meter per seconds to fps (foot per seconds)
consumtion all functions from adhoc
F_C_MPGBGAL2L100KM
F_C_MPUSGAL2L100KM
F_C_L100KM2MPGBGAL
F_C_L100KM2MPUSGAL
F_C_KMPL2L100KM
F_C_L100KM2KMPL
F_C_MPL2L100KM
F_C_L100KM2MPL

mpg GB (miles per GB gallon) to litre per 100 km
mpg US (miles per US gallon) to Liter per 100 km
litre / 100 km to mpg GB (miles per GB gallon)
litre / 100 km to mpg US (miles per US gallon)
km / litre to litre / 100 km
litre / 100 km to km / litre
miles / litre to litre / 100 km
litre / 100 km to miles / litre
nach oben • go top •
 
Converting functions: nautical units
convert in SI-units all functions from adhoc
F_C_SHOT2M
F_C_CBL2M
F_C_NL2M
F_C_NM2M
F_C_SM2KM

F_C_RT2CBM
F_C_SMPH2KMPH
Shackle (GB) or shot (US) to meter
cable to meter
sealeague to meter
admiraltymile to meter
seamile to kilometer
registerton to cubic meter
seamile per hour (= knots) to kilometer per hour
convert from SI-units all functions from adhoc
F_C_M2SHOT
F_C_M2CBL
F_C_M2NL
F_C_M2NM
F_C_KM2SM

F_C_CBM2RT
F_C_KMPH2SMPH
meter to shackle (GB) or shot (US)
meter to cable
meter to sealeague
meter to admiraltymile
kilometer to seamile
cubic meter to registerton
kilometer per hour to seamile per hour (= knots)
nach oben • go top •
 
Converting functions: Number systems
F_ROMAN2ARABIC function from adhoc
Entrypoint roman2arabic
Input CSTRING(50) number in roman system as string (upper oder lower)
Output INTEGER integer in arabic decimal system
Classic form also shorten forms are allowed, f.e. 1999:
classic        MCMXCIX
shorten 1    MXMIX                   
shorten 2    MIM
Also the original roman form is allowed, f.e. 1984:
original       MDCCCCLXXXIIII
classic        MCMLXXXIV
Allowed also in roman nor allowed forms, f.e. 1900:
correct                   MCM      thousend + (thousend - one hundred)
normaly wrong       MDCD    thousend + five hundred + (five hundred - one hundred)
If there is a not roman digit, f.e. MCA, returns -1
If you don't respect the rule, that in subtraction form only one digit in front is allowed (IX allowed, IIX not allowed), returns bullshit.
Great thousend numbers like 10000 are returned correct if you put in MMMMMMMMMM. Maximum is 250 thousend.
TestSQL
SELECT 1984 AS ISCORRECT, F_ROMAN2ARABIC('MCMLXXXIV') FROM RDB$DATABASE;
SELECT NULL AS ISCORRECT, F_ROMAN2ARABIC(NULL) FROM RDB$DATABASE;
nach oben • go top •
F_ARABIC2ROMAN function from adhoc
Entrypoint arabic2roman
Input INTEGER integer in arabic decimal system
Output CSTRING(250) number in roman system (classic form)
Max. Zahl ist 200000
TESTSQL
SELECT 'MCMLXXXIV' AS ISCORRECT, F_ARABIC2ROMAN(1984) FROM RDB$DATABASE;
SELECT NULL AS ISCORRECT, F_ARABIC2ROMAN(NULL) FROM RDB$DATABASE;
nach oben • go top •
F_CONVERTFROM33 compatible to FreeUDFLibC
Entrypoint convertfrom33
Input CSTRING(254) number in 33-system as string
Output INTEGER integer in decimal system
TestSQL
SELECT 1000 AS ISCORRECT, F_CONVERTFROM33('WB') FROM RDB$DATABASE;
SELECT NULL AS ISCORRECT, F_CONVERTFROM33(NULL) FROM RDB$DATABASE;
nach oben • go top •
F_CONVERTTO33 compatible to FreeUDFLibC
Entrypoint convertto33
Input INTEGER integer in decimal system
Output CSTRING(254) number in 33-system
TestSQL
SELECT 'WB' AS ISCORRECT, F_CONVERTTO33(1000) FROM RDB$DATABASE;
SELECT NULL AS ISCORRECT, F_CONVERTTO33(NULL) FROM RDB$DATABASE;
nach oben • go top •
F_CONVERTFROMBASE compatible to FreeUDFLibC
Entrypoint convertfrombase
Input CSTRING(32) number from anyone number-system as string

INTEGER Basis of the number which can be converted (for example 2 for binary-system)

CSTRING(8) all numbers, which are valid in the number-system as string (e.g. ‘01234567' for oktal-system).
Output INTEGER integer in decimal system
TestSQL
SELECT 3 AS ISCORRECT, F_CONVERTFROMBASE('11', 2, '01') FROM RDB$DATABASE;
SELECT 9 AS ISCORRECT, F_CONVERTFROMBASE('11', 8, '01234567') FROM RDB$DATABASE;
SELECT NULL AS ISCORRECT, F_CONVERTFROMBASE(NUll, NULL, NULL) FROM RDB$DATABASE;
nach oben • go top •
F_CONVERTTOBASE compatible to FreeUDFLibC
Entrypoint converttobase
Input INTEGER integer in decimal system

INTEGER Basis of number to convert (for example 2 for binary-system)

CSTRING(254) all numbers, which are valid in the number-system as string (e.g. ‘01234567' for oktal-system)
Output CSTRING(254) number in number-system descipted in parameter 2
TestSQL
SELECT '11' AS ISCORRECT, F_CONVERTTOBASE(3, 2, '01') FROM RDB$DATABASE;
SELECT NULL AS ISCORRECT, F_CONVERTTOBASE(NULL, NULL, NULL) FROM RDB$DATABASE;
nach oben • go top •
F_HEXTOINT compatible to GrUDF
Entrypoint hextoint
Input CSTRING(20) Hexword
Output INTEGER integer in decimal system
TestSQL
SELECT 13 AS ISCORRECT, F_HEXTOINT('000000000d') FROM RDB$DATABASE;
SELECT 13 AS ISCORRECT, F_HEXTOINT('d') FROM RDB$DATABASE;
SELECT 13 AS ISCORRECT, F_HEXTOINT('D') FROM RDB$DATABASE;
SELECT NULL AS ISCORRECT, F_HEXTOINT(NULL) FROM RDB$DATABASE;
nach oben • go top •
F_INTTOHEX compatible to GrUDF
Entrypoint inttohex
Input INTEGER integer in decimal system

INTEGER amount of digits (left filled of with 0)
Output CSTRING(254) Hexword
TestSQL
SELECT '000000000d' AS ISCORRECT, F_INTTOHEX(13, 10) FROM RDB$DATABASE;
SELECT NULL AS ISCORRECT, F_INTTOHEX(NULL, NULL) FROM RDB$DATABASE;
nach oben • go top •
 
Converting functions: Geometrical transformations

all functions from adhoc
F_DEGTORAD Changes an angle from (Alt-)degree in radian (radian measure)
Entrypoint degtorad
F_RADTODEG Changes an angle from radian (radian measure) in (Alt-)degree
Entrypoint radtodeg
Input ever DOUBLE
Output ever DOUBLE
TestSQLs
SELECT '3.1415.. = PHI' AS ISCORRECT, F_DEGTORAD(180) FROM RDB$DATABASE;
SELECT NULL AS ISCORRECT, F_DEGTORAD(NULL) FROM RDB$DATABASE;
SELECT 80.2140913183152 AS ISCORRECT, F_RADTODEG(1.4) FROM RDB$DATABASE;
SELECT NULL AS ISCORRECT, F_RADTODEG(NULL) FROM RDB$DATABASE;
vorige Seite • previous page • passée sitenach oben • go top • vers le hautnächste Seite • next page • prochain site