Aero Bases 1.0.1
Users Guide
A Plug-in for FileMaker Pro
from Mouken, L.C.

Contents:

Function Reference:

Base conversion:

Informational:

Introduction

Aero Bases 1.0.1 is an external function plug-in 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("Base-ToHex", "123")

You may, of course, also use fields for the second parameter. For example:

External("Base-ToHex", 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("Base-ToHex", FieldA & "," & FieldB)
External("Base-ToHex","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 upper-right hand corner of the calculation dialog. If Aero Bases does not appear, go to the Plug-Ins 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 binary--it 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 number--do 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.

return to top

ToDecimal

This function converts a number to decimal (base 10) format from another base.

Formula: Result: Notes:
External("Base-ToDecimal", "31") 31 The number being input is already decimal, so it is not changed.
External("Base-ToDecimal", "0x31") 49 The prefix '0x' indicates that the input value is hexidecimal.
External("Base-ToDecimal", "31h") 49 The suffix 'h' indicates that the input value is hexidecimal.
External("Base-ToDecimal", "\31") 25 The prefix '\' indicates that the input value is octal.
External("Base-ToDecimal", "x101") 5 The prefix 'x' indicates that the input value is binary.
External("Base-ToDecimal", "31,H") 49 The parameter 'H' indicates that the input value is hexidecimal.
External("Base-ToDecimal", "\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("Base-ToDecimal", "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.

return to top

ToHex

This function converts a number to hexidecimal (base 16) format from another base.

Formula: Result: Notes:
External("Base-ToHex", "31") 1F  
External("Base-ToHex", "31,L") 1f 'L' causes hexidecimal digits A thru F to be displayed lowercase.
External("Base-ToHex", "0x31") 31 The prefix '0x' indicates that the input value is already hexidecimal, so it is not changed.
External("Base-ToHex", "\37") 1F The prefix '\' indicates that the input value is octal.
External("Base-ToHex", "x111010") 3A The prefix 'x' indicates that the input value is binary.
External("Base-ToHex", "31,H") 31 The parameter 'H' indicates that the input value is hexidecimal.
External("Base-ToHex", "\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("Base-ToHex", "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.

return to top

ToOctal

This function converts a number to octal (base 8) format from another base.

Formula: Result: Notes:
External("Base-ToOctal", "31") 37  
External("Base-ToOctal", "31h") 61 The suffix 'h' indicates that the input value is hexidecimal.
External("Base-ToOctal", "\31") 31 The prefix '\' indicates that the input value is already octal, so it is not changed.
External("Base-ToOctal", "x1101") 15 The prefix 'x' indicates that the input value is binary.
External("Base-ToOctal", "31,H") 61 The parameter 'H' indicates that the input value is hexidecimal.
External("Base-ToOctal", "\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("Base-ToOctal", "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.

return to top

ToBinary

This function converts a number to binary (base 2) format from another base.

Formula: Result: Notes:
External("Base-ToBinary", "31") 11111  
External("Base-ToBinary", "0x31") 110001 The prefix '0x' indicates that the input value is hexidecimal.
External("Base-ToBinary", "\31") 11001 The prefix '\' indicates that the input value is octal.
External("Base-ToBinary", "x101") 101 The prefix 'x' indicates that the input value is already binary, so it is not changed.
External("Base-ToBinary", "31,H") 110001 The parameter 'H' indicates that the input value is hexidecimal.
External("Base-ToBinary", "\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("Base-ToBinary", "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.

return to top

NumToASCII

This function converts a number between 1 and 255 to an ASCII character.

Formula: Result: Notes:
External("Base-NumToASCII", "72") H  
External("Base-NumToASCII", "0x48") H The prefix '0x' indicates that the input value is hexidecimal.
External("Base-NumToASCII", "\110") H The prefix '\' indicates that the input value is octal.
External("Base-NumToASCII", "x1001000") H The prefix 'x' indicates that the input value is already binary, so it is not changed.
External("Base-NumToASCII", "48,H") H The parameter 'H' indicates that the input value is hexidecimal.
External("Base-NumToASCII", "\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("Base-NumToASCII", "-72")   The number is outside the range 1 to 255, so no value is returned.

return to top

ASCIIToNum

This function converts an ASCII character to a number.

Formula: Result: Notes:
External("Base-ASCIIToNum", "H") 72  
External("Base-ASCIIToNum", "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("Base-ASCIIToNum", "H,B") 1001000 The parameter 'B' instructs Aero Bases to output the number in binary format.
External("Base-ASCIIToNum", "=,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("Base-ASCIIToNum", "M,h-h") 4Dh The parameter 'h' instructs Aero Bases to output the number in hexidecimal format. '-h' instructs Aero Bases to output 'h' after the number.

return to top

Version

This function displays the version string for the Aero Bases plug-in.

Formula: Result: Notes:
External("Base-Version", "") Aero Bases 1.0.1 The second parameter is ignored.

return to top

Help

This function returns a brief description and example for the Aero Bases function named.

Formula: Result: Notes:
External("Base-Help", "ToHex") ToHex: Converts a number to hexidecimal format.
External("Base-ToHex", "123") = 7B
External("Base-ToHex", "123,4") = 007B
External("Base-ToHex", "123,l") = 7b
External("Base-ToHex", "123,l+0x") = 0x7b
External("Base-ToHex", "123,4-h") = 007Bh
 
External("Base-Help", "Goose") Help: Shows a description of, syntax for, and example of the specified function.
External("Base-Help", "ToDecimal") shows help for the function "Base-ToDecimal".
If the second parameter is not the name of an AeroBases function, the result is the help for the "Help" function itsself.

return to top

About

This function displays the "About Box" dialog box for the Aero Bases plug-in.

Formula: Result: Notes:
External("Base-About", "")   No value is returned, but a dialog box is displayed. The second parameter is ignored.

return to top


FileMaker Pro Plug-ins and Solutions | Mouken, L.C. Home Page

© 2001 Mouken, L.C.