2006-01-19 06:46:26

by Jeffrey V. Merkey

[permalink] [raw]
Subject: Inserting Commas into Those Big Numbers


If anyone cares to make the kernel output more readable, heres a code
snippet that formats any text string with numbers (decimal) to
insert commas. I am too old and going blind looking at computer screen
with these long numbers. If useful to anyone, enjoy.

Jeff



Attachments:
sprintf_comma.c (432.00 B)

2006-01-20 02:03:14

by dean gaudet

[permalink] [raw]
Subject: Re: Inserting Commas into Those Big Numbers

On Wed, 18 Jan 2006, Jeff V. Merkey wrote:

> If anyone cares to make the kernel output more readable, heres a code snippet
> that formats any text string with numbers (decimal) to
> insert commas. I am too old and going blind looking at computer screen with
> these long numbers. If useful to anyone, enjoy.

you know i wish C99 had mandated support for numbers like 1_000_000 or
0x0123_4567_89ab_cdef. (not sure if Ada originated this style, but that's
where i first saw it.)

-dean