Previous Thread
Next Thread
Print Thread
Rate Thread
#101232 09/21/2000 10:41 PM
Joined: May 2000
Posts: 243
Member
Member
Offline
Joined: May 2000
Posts: 243
Im having problems turning a decimal number: 0.8

into: %80

Should I use sprintf? Because that is what I was tring but it wasn't working? Mark, Atom? Have any suggestions?

------------------
My Freeware Board

Sponsored Links
#101233 09/21/2000 11:08 PM
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
LOL, I too have had those moments where trying to do something monumentally tricky and cute, that I forget there is an incredibly simple solution:

Code
code:

[Linked Image]

--mark


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
#101234 09/22/2000 2:34 PM
Joined: May 2000
Posts: 243
Member
Member
Offline
Joined: May 2000
Posts: 243
Me feels stupid hehe [Linked Image]

------------------
My Freeware Board

#101235 09/22/2000 3:54 PM
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
Heh, the ole Brain Farts. Gotta love em. Especially when they cause third grade math to bite you in the ass, in public! [Linked Image] [Linked Image]

--mark


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
#101236 09/22/2000 4:27 PM
Joined: Aug 2000
Posts: 469
Member
Member
Offline
Joined: Aug 2000
Posts: 469
hmmm
we just did something like that in 'fundmanetals of programming'. Kindaaaaaa...

I don't like true basic, it's not as fun as perl.

------------------
-david
According to the book Buzzed, I am literally addicted to caffiene and display all but a couple of the signs of heroin abuse.

Sponsored Links
#101237 09/22/2000 10:15 PM
Joined: Aug 2000
Posts: 3,590
Likes: 1
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
Likes: 1
Was wondering why in the hell you would need sprintf for decmimals >:0)

------------------
Da Wannabe Cannuck

#101238 09/24/2000 12:26 PM
Joined: Sep 2000
Posts: 18
Junior Member
Junior Member
Offline
Joined: Sep 2000
Posts: 18
Sometimes you'll use sprintf on decimal to strictly control the number of digits; say, for columnar presentation...

------------------
etLux
CodeBrain.com Free Java


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
• Shock Hosting
• Stable Host
• bluehost
• InterServer
Visit us on Facebook
Member Spotlight
Ruben Rocha
Ruben Rocha
Lutz,FL,USA
Posts: 253
Joined: January 2000
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,825
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 7875
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 26
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)