Tech Tip: Displaying numeric values as hexadecimal
PRODUCT: 4D | VERSION: 15 | PLATFORM: Mac & Win
Published On: May 27, 2015
In 4D, numeric values displayed inside a form are displayed as a decimal value by default. There are a couple ways to display numeric values as hexadecimal inside of a form variables:
1.) Use a string representation to display the hexadecimal value.
The 4D command STRING takes in an optional 2nd parameter for format. The value passed to this parameter should be "&x". See the example below:
vDec:=10 //numeric value vHex:=String(vDec;"&x") //hexidecimal alpha representation of the numeric value |
2.) Use a display filter to filter the results. This will allow the variable to be of numeric type.
To add a display filter, click on the variable to bring up the properties list. Under the Number Format option click on the button "..." to bring up the filter editor:

Add a filter with the following definition: "&x":

In the properties list, select the new filter for the Display Format:

The variable will now display numbers as its hexdecimal:
