Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: thespindoctor on September 29, 2011, 09:26:51 AM

Title: CB formatting numbers
Post by: thespindoctor on September 29, 2011, 09:26:51 AM
How dose one format a double number for printing to a file to get
xx.0000 instead of xx.000000000000 in CBasic?
Thanks
Keith
Title: Re: CB formatting numbers
Post by: BR549 on September 29, 2011, 10:20:20 AM
Tap= 1.11111111111111
Tap= Format(tap,"00.0000")  ' Formatting the Variable
NOW Tap=1.1111

You can also format on the fly

as   Msgbox("Tap= ") & Format("Tap,"00.0000")

The message will say  Tap= 1.1111

That is one way, (;-) TP
Title: Re: CB formatting numbers
Post by: thespindoctor on September 29, 2011, 11:04:20 AM
Thanks TP, that was an easy one!  Now I will have to find a hard one for you... >:D
Keith
Title: Re: CB formatting numbers
Post by: BR549 on September 29, 2011, 12:26:51 PM
You are lucky I am working on new screens and cool new plasma functions.  I have to use format a lot to make it all look neat.

Just wait until I don't work on them for a short while, I will forget half of it and THEN you can stump me easy enough.

BUT I did create some neat new manuals to reference. (;-)

(;-) TP
Title: Re: CB formatting numbers
Post by: thespindoctor on September 29, 2011, 02:28:55 PM
I appreciate your help and will look forward to seeing the manuals!

Keith
Title: Re: CB formatting numbers
Post by: BR549 on September 29, 2011, 02:33:24 PM
AH the Manuals(;-) Those are the secrets of the Jedi Macherteer.

(;-) TP