Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - numcomma() add commas at thousand positions to a number string http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 numcomma()          Add commas at thousand positions to a number string
------------------------------------------------------------------------------
 Declaration
   string.hdr

 Syntax
   func char numcomma extern
   param const char cNumber

 Arguments
   cNumber is a number string to manipulate.

 Return
   A string with added commas.

 Description
   The numcomma() function adds commas at thousand positions to a number
   string.

 Example
   #define EXAMPLE_STRING
   #include example.hdr

   proc Test_numcomma
   ? numcomma( "12345678.123456" )   // print "12,345,678.123456"
   ? numcomma( "-123456789" )        // print "-123,456,789"
   ? numcomma( "1" )                 // print "1"
   ? numcomma( "-1" )                // print "-1"
   ? numcomma( "" )                  // print ""
   endproc

   proc main
   Test_numcomma()
   endproc

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson