printf style formatting

BlitzMax Forums/BlitzMax Programming/printf style formatting

Brucey(Posted 2007) [#1]
Have been after some good text formatting for ages, but haven't seen anything on the forums.


Thought I'd put my new RegEx module to good use, so I threw together a new formatting module over the weekend which lets you format text and numbers in the C sprintf / printf style.

Currently supported are %s, %d and %f, along with support for all the flags, width, precision stuff those conversion specifiers utilize.

The module is pure BlitzMax, although it uses the RegEx module for pre-parsing the format string. (better to let something designed for the task do the hard work for you :-)

As usual... it's free... is cross-platform... and comes fully documented with some examples.

You can get it from my website : http://brucey.net/programming/blitz/index.php


Comments, suggestions and bug reports are always appreciated.



( 'twas developed entirely on Linux using the GTK build of the Max IDE, with references to "man sprintf" :-)


assari(Posted 2007) [#2]
Your productivity is amazing. Thanks for sharing


grable(Posted 2007) [#3]
Damn, i just made something similar ;)

Although i used C and its all in one function.. hehe

Congrats anyway brucey, you must be a busy man!


Brucey(Posted 2007) [#4]
I considered C, but I don't like it.

That and I like to see what Max is capable of - which is plenty, it would seem.

:-)


Who was John Galt?(Posted 2007) [#5]
Nice one Brucey. Very useful.