Brian Dunning's FileMaker Custom Functions

DecToAnyBase ( decimal ; base )

Returns the representation of a decimal (base-10) number in the alphabet of the specified base.

  Average rating: 4.1 (45 votes) Log in to vote

Michael Horak   Michael Horak
*COMMENT Visual Realisation
http://comment.cjb.net

Share on Facebook Share on Twitter

  Sample input:
DecToAnyBase ( 256 ; 8 )
  Sample output:
400

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

DecToAnyBase function

Author
*COMMENT Visual Realisation

Format
DecToAnyBase ( decimal ; base )

Parameters
decimal - any numeric expression or field containing a non-negative numeric expression. Only the integer part of decimal will be considered.

base - any numeric expression or field containing a non-negative numeric expression.

Data type returned
text

Description
Returns the representation of a decimal (base-10) number in the alphabet of the specified base.

Note:
As provided, DecToAnyBase() will convert a decimal number to any base between 2 and 16, using standard symbols.

The function can be easily modified to accomodate bases greater than 16 and/or other symbols, incl. compound (more than one character per symbol) symbols.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.