Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 08:20:00 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  CB formatting numbers
Pages: 1   Go Down
Print
Author Topic: CB formatting numbers  (Read 204 times)
0 Members and 1 Guest are viewing this topic.
thespindoctor
Active Member

Offline Offline

Posts: 73


View Profile WWW
« on: September 29, 2011, 08: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
Logged
BR549
Active Member

Offline Offline

Posts: 2,557


View Profile
« Reply #1 on: September 29, 2011, 09: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
« Last Edit: September 29, 2011, 09:22:43 AM by BR549 » Logged
thespindoctor
Active Member

Offline Offline

Posts: 73


View Profile WWW
« Reply #2 on: September 29, 2011, 10:04:20 AM »

Thanks TP, that was an easy one!  Now I will have to find a hard one for you... Evil
Keith
Logged
BR549
Active Member

Offline Offline

Posts: 2,557


View Profile
« Reply #3 on: September 29, 2011, 11:26:51 AM »

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
Logged
thespindoctor
Active Member

Offline Offline

Posts: 73


View Profile WWW
« Reply #4 on: September 29, 2011, 01:28:55 PM »

I appreciate your help and will look forward to seeing the manuals!

Keith
Logged
BR549
Active Member

Offline Offline

Posts: 2,557


View Profile
« Reply #5 on: September 29, 2011, 01:33:24 PM »

AH the Manuals(;-) Those are the secrets of the Jedi Macherteer.

(;-) TP
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!