User to user discussion and support for UltraEdit, UEStudio, UltraCompare, and other IDM applications.

Syntax highlighting, code folding, brace matching, code indenting, and function list
3 posts Page 1 of 1
Hi all,

I am working in assembly language and I am trying to highlight numbers in hex or binary using $ and % as the number identifiers. I haven't been able to figure out how to do this. Has anyone used this type of hex notation in their syntax highlighting?

Mongenel
First, I suggest having $ and % in list of word delimiters, i.e. on line starting with /Delimiters =

Second, add to your syntax highlighting wordfile:

Code: Select all
/C7"Hexadecimal numbers"
** $
/C8"Binary numbers"
** %

Use color group numbers not already used for those 2 sub string definitions, see also help page Syntax Highlighting in help of UltraEdit.

With those definitions all strings starting with (delimiter) character $ are highlighted with settings defined for color group 7 with name Hexadecimal numbers and all strings starting with (delimiter) character % with color group 8 with name Binary numbers.

Of course you can use also

Code: Select all
/C7"Hex/binary numbers"
** $ %

in case of numbers in hexadecimal or binary should be highlighted with same color.
Best regards from Austria
That works exactly how I need it to. Thank you. :)
3 posts Page 1 of 1