hex: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Macros:Functions:hex moved to hex: Moved out of Macro namespace)
m (Added MacroFunction template and Mathematical Function category)
Line 1: Line 1:
==Function hex==
{{MacroFunction
|name=hex
|description=
Returns a string which contains the hexadecimal representation of the number that was passed in.
Returns a string which contains the hexadecimal representation of the number that was passed in.


===Usage===
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: hexVal = hex(num)
[h: hexVal = hex(num)
</source>
</source>


 
|examples=
===Examples===
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[r: hex(23)]
[r: hex(23)]
Line 18: Line 19:
</source>
</source>
Returns 0xA.
Returns 0xA.
}}
[[Category:Mathematical Function]]

Revision as of 04:21, 8 March 2009

hex() Function

Returns a string which contains the hexadecimal representation of the number that was passed in.

Usage

[h: hexVal = hex(num)

Examples

[r: hex(23)]

Returns 0x17.

[r: hex(10)]
Returns 0xA.