Help Contents / Arithmetic / Print formatting / intForm

intForm num width base

outputs a word containing ciphers that represent the number in the base base. I.e. if base==10 then the number will be output decimal, if base==2 the number will be output binary, if base==16 the output will be hexadecimal, etc. 

Negative integers will be converted to unsigned int, so -1 in base==16 will be FFFFFFFF. 

Examples: 

	intForm 1234 0 10		;1234  ;-) 
	intForm 1234 0 16		;4D2  ;-) 
	intForm 1234 0 2		;10011010010  ;-) 
	intForm -1 0 16		;FFFFFFFF  ;-) 
	intForm -2 0 16		;FFFFFFFE  ;-) 


previous: Form	next: toInt
