[gambit-list] dumb question: outputting in hex format

Vincent St-Amour stamourv at iro.umontreal.ca
Mon Jun 22 23:03:28 EDT 2009


On Monday, June 22, 2009 at 19:57:57 (-0700), lowly coder wrote:
 > I know that #xdeadbeef lets me input in hex, but is there something like C's
 > fprintf(stderr, "%x"); ?

number->string can take the output base as argument. So to write a
number in hex, you'd do something like that :

(display (number->string n 16))

Vincent



More information about the Gambit-list mailing list