Aero Bases 1.0.1
Users Guide A Plugin for FileMaker Pro from Mouken, L.C. 
Contents:
Function Reference:Base conversion:
Informational:
Introduction 
Aero Bases 1.0.1 is an external function plugin for FileMaker Pro. With Aero Bases installed, a number of new calculation functions become available in FileMaker Pro calculation fields and ScriptMaker scripts.
The functions provided by Aero Bases are called using FileMaker Pro's "External" function with the first parameter being "Base" followed by the name of the function. For example, to convert the number 123 to hexidecimal, you could enter the following calculation formula:
External("BaseToHex", "123")
You may, of course, also use fields for the second parameter. For example:
External("BaseToHex", some_field)
And you may also combine multiple fields or pieces of text together. For example, if the field "FieldA" contains the value "143", and the field "FieldB" contains the value "4+0x", then the following two lines are equivalent, and will return the same result:
External("BaseToHex", FieldA & "," & FieldB)
External("BaseToHex","143,4+0x")
See below for descriptions and usage examples of each of the functions provided by Aero Bases.
Installation 
Before Aero Bases may be used, it must be moved to the "FileMaker Extensions" folder (Macintosh) or the "SYSTEM" folder located in the FileMaker Pro folder (Windows). After placing Aero Bases in the correct location, restart FileMaker Pro. Aero Bases should then be enabled, and it's functions should appear in the list shown when "External Functions" is selected from the list at the upperright hand corner of the calculation dialog. If Aero Bases does not appear, go to the PlugIns panel in Application Preferences, and make sure that AeroBases is checked.
Software Requirements 
Macintosh: FileMaker Pro 4.0 or higher for Macintosh.
The Macintosh version of Aero Bases is a fat binaryit will run at native speeds on either a PowerMacintosh or an older "68K" based Macintosh.
Windows: FileMaker Pro 4.0 or higher for Windows and one of: Windows95 or higher, or Windows NT 4.0 or higher.
Parameters for all base conversion functions 
The base conversion functions all accept the same parameters, with minor exceptions for ASCIIToNum. The first parameter for each is a number, except for ASCIIToNum, for which the first parameter is a character. The following explains the format of the number:
Example:  Interpreted as:  Notes: 
31 
decimal  If the number contains only digits, it is by default considered to be decimal (base 10). 
31 
decimal  Negative numbers are accepted. 
31.5 
error  Only whole numbers are accepted. 
0x31 
hexidecimal  The prefix '0x' indicates hexidecimal. 
0x31 
hexidecimal  Negative hexidecimal numbers are also accepted, with the minus sign before the 0x prefix. 
31h 
hexidecimal  The suffix 'h' indicates hexidecimal. 
31h 
hexidecimal  Another negative number. 
\31 
octal  The prefix '\' indicates octal. 
\31 
octal  A negative octal number. 
x101 
binary  The prefix 'x' indicates binary. 
x101 
binary  A negative binary number. 
The number may optionally be followed by a comma and then a combination of the following. You may combine one item out of each of the following groups. Prefixes and suffixes must be last, but the order of the other parameters does not matter. Only enter one comma after the numberdo not separate the following parameters with commas.
Input format specifier (except for ASCIIToNum, in which case this is an output format specifier):
Value(s):  Meaning:  Notes: 
H or h 
hexidecimal  The input number is hexidecimal. Use this parameter when inputting hexidecimal values without the '0x' prefix or 'h' suffix. 
D or d 
decimal  Explicitly states that the input value is in decimal format. This is the default. 
O or o 
octal  The input number is in octal format. Use this parameter when inputting octal values without the '\' prefix. 
B or b 
binary  The input number is in octal format. Use this parameter when inputting octal values without the '\' prefix. 
Output case specifier (only affects the output of ToHex):
Value(s):  Meaning:  Notes: 
U or u 
uppercase  Use uppercase hexidecimal digits. This is the default. 
L or l 
lowercase  Use lowercase hexidecimal digits. 
Minimum digits:
Value(s):  Meaning:  Notes: 
12 
output at least twelve digits  You may enter any number up to 64. If the number to be output has less digits than specified, zeros will be prepended to make the number the desired length. 
Prefix or suffix:
Value(s):  Meaning:  Notes: 
+0x 
prefix the number is '0x'  Anything following the plus sign will appear before the number (but after the minus sign, if the number is negative). You may enter up to 16 characters after the plus sign. 
h 
add 'h' after the number  Anything following the minus sign will appear after the number. You may enter up to 16 characters after the minus sign. 
ToDecimal 
This function converts a number to decimal (base 10) format from another base.
Formula:  Result:  Notes: 
External("BaseToDecimal", "31") 
31  The number being input is already decimal, so it is not changed. 
External("BaseToDecimal", "0x31") 
49  The prefix '0x' indicates that the input value is hexidecimal. 
External("BaseToDecimal", "31h") 
49  The suffix 'h' indicates that the input value is hexidecimal. 
External("BaseToDecimal", "\31") 
25  The prefix '\' indicates that the input value is octal. 
External("BaseToDecimal", "x101") 
5  The prefix 'x' indicates that the input value is binary. 
External("BaseToDecimal", "31,H") 
49  The parameter 'H' indicates that the input value is hexidecimal. 
External("BaseToDecimal", "\31,H") 
The prefix '\' indicates that the input value is octal, but the parameter 'H' indicates hexidecimal. Since these do not match, Aero Bases does not assume that one is correct over the other, and no value is returned.  
External("BaseToDecimal", "0x31,3+#") 
#049  The prefix '0x' indicates that the input value is hexidecimal. '3' indicates a minimum number of digits, resulting in a zero being added before '49'. '+#' results in '#' being added before the number. 
ToHex 
This function converts a number to hexidecimal (base 16) format from another base.
Formula:  Result:  Notes: 
External("BaseToHex", "31") 
1F  
External("BaseToHex", "31,L") 
1f  'L' causes hexidecimal digits A thru F to be displayed lowercase. 
External("BaseToHex", "0x31") 
31  The prefix '0x' indicates that the input value is already hexidecimal, so it is not changed. 
External("BaseToHex", "\37") 
1F  The prefix '\' indicates that the input value is octal. 
External("BaseToHex", "x111010") 
3A  The prefix 'x' indicates that the input value is binary. 
External("BaseToHex", "31,H") 
31  The parameter 'H' indicates that the input value is hexidecimal. 
External("BaseToHex", "\31,H") 
The prefix '\' indicates that the input value is octal, but the parameter 'H' indicates hexidecimal. Since these do not match, Aero Bases does not assume that one is correct over the other, and no value is returned.  
External("BaseToHex", "27,4+0x") 
0x001B  '4' indicates a minimum number of digits, resulting in two zeros being added before '1B'. '+0x' results in '0x' being added before the number. 
ToOctal 
This function converts a number to octal (base 8) format from another base.
Formula:  Result:  Notes: 
External("BaseToOctal", "31") 
37  
External("BaseToOctal", "31h") 
61  The suffix 'h' indicates that the input value is hexidecimal. 
External("BaseToOctal", "\31") 
31  The prefix '\' indicates that the input value is already octal, so it is not changed. 
External("BaseToOctal", "x1101") 
15  The prefix 'x' indicates that the input value is binary. 
External("BaseToOctal", "31,H") 
61  The parameter 'H' indicates that the input value is hexidecimal. 
External("BaseToOctal", "\31,H") 
The prefix '\' indicates that the input value is octal, but the parameter 'H' indicates hexidecimal. Since these do not match, Aero Bases does not assume that one is correct over the other, and no value is returned.  
External("BaseToOctal", "0x31,3+\") 
\061  The prefix '0x' indicates that the input value is hexidecimal. '3' indicates a minimum number of digits, resulting in a zero being added before '61'. '+\' results in '\' being added before the number. 
ToBinary 
This function converts a number to binary (base 2) format from another base.
Formula:  Result:  Notes: 
External("BaseToBinary", "31") 
11111  
External("BaseToBinary", "0x31") 
110001  The prefix '0x' indicates that the input value is hexidecimal. 
External("BaseToBinary", "\31") 
11001  The prefix '\' indicates that the input value is octal. 
External("BaseToBinary", "x101") 
101  The prefix 'x' indicates that the input value is already binary, so it is not changed. 
External("BaseToBinary", "31,H") 
110001  The parameter 'H' indicates that the input value is hexidecimal. 
External("BaseToBinary", "\31,H") 
The prefix '\' indicates that the input value is octal, but the parameter 'H' indicates hexidecimal. Since these do not match, Aero Bases does not assume that one is correct over the other, and no value is returned.  
External("BaseToBinary", "0x31,8+x") 
x00110001  The prefix '0x' indicates that the input value is hexidecimal. '8' indicates a minimum number of digits, resulting in two zeros being added before '110001'. '+x' results in 'x' being added before the number. 
NumToASCII 
This function converts a number between 1 and 255 to an ASCII character.
Formula:  Result:  Notes: 
External("BaseNumToASCII", "72") 
H  
External("BaseNumToASCII", "0x48") 
H  The prefix '0x' indicates that the input value is hexidecimal. 
External("BaseNumToASCII", "\110") 
H  The prefix '\' indicates that the input value is octal. 
External("BaseNumToASCII", "x1001000") 
H  The prefix 'x' indicates that the input value is already binary, so it is not changed. 
External("BaseNumToASCII", "48,H") 
H  The parameter 'H' indicates that the input value is hexidecimal. 
External("BaseNumToASCII", "\110,H") 
The prefix '\' indicates that the input value is octal, but the parameter 'H' indicates hexidecimal. Since these do not match, Aero Bases does not assume that one is correct over the other, and no value is returned.  
External("BaseNumToASCII", "72") 
The number is outside the range 1 to 255, so no value is returned. 
ASCIIToNum 
This function converts an ASCII character to a number.
Formula:  Result:  Notes:  
External("BaseASCIIToNum", "H") 
72  
External("BaseASCIIToNum", "Hello") 
72  Everything after the first character is ignored, unless there is a comma, in which case, the characters after the comma are interpreted as indicated in the following examples.  
External("BaseASCIIToNum", "H,B") 
1001000  The parameter 'B' instructs Aero Bases to output the number in binary format.  
External("BaseASCIIToNum", "=,o3+\") 
\075  The parameter 'o' instructs Aero Bases to output the number in octal format. '3' indicates a minimum number of digits to output, resulting in a zero being added before '75'. '+\' instructs Aero Bases to output '\' before the number.  
External("BaseASCIIToNum", "M,hh") 
4Dh  The parameter 'h' instructs Aero Bases to output the number in hexidecimal format. 'h' instructs Aero Bases to output 'h' after the number. 
Version 
This function displays the version string for the Aero Bases plugin.
Formula:  Result:  Notes: 
External("BaseVersion", "") 
Aero Bases 1.0.1  The second parameter is ignored. 
Help 
This function returns a brief description and example for the Aero Bases function named.
Formula:  Result:  Notes: 
External("BaseHelp", "ToHex") 
ToHex: Converts a number to hexidecimal format. External("BaseToHex", "123") = 7B External("BaseToHex", "123,4") = 007B External("BaseToHex", "123,l") = 7b External("BaseToHex", "123,l+0x") = 0x7b External("BaseToHex", "123,4h") = 007Bh 

External("BaseHelp", "Goose") 
Help: Shows a description of, syntax for, and example of the specified function. External("BaseHelp", "ToDecimal") shows help for the function "BaseToDecimal". 
If the second parameter is not the name of an AeroBases function, the result is the help for the "Help" function itsself. 
About 
This function displays the "About Box" dialog box for the Aero Bases plugin.
Formula:  Result:  Notes: 
External("BaseAbout", "") 
No value is returned, but a dialog box is displayed. The second parameter is ignored. 
© 2001 Mouken, L.C.