Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C help, .0f meaning
#1
Hi,

I'm trying to convert some C/C++ code to BASIC but having a problem with understanding what .0f means in the following line

Code:
variable = 255.0f/(5000-10)

I've tried searching for answer/defs but its eluding me, I know its really simple but any help is appreciated.

Thanks,

cirux
Reply
#2
It means that the number is a floating-point number. The f in 0f tells you that it's floating-point, and the 0 is the part after the decimal.
.14159265358979323846264338327950288419716939937510582709445
Glarplesnarkleflibbertygibbertygarbethparkentalelelangathaffendoinkadonkeydingdonkaspamahedron.
Reply
#3
thanks for the help, I thought it might me something like that
Reply
#4
sloppy ass c/c++ pprogrammers don't know what the hell whitespace is. so dumb Tongue
Reply
#5
Whatthehelliswhitespace?
stylin:
Reply
#6
i have NEVER seen a c program that was formatted as i would do it. ever.

i mean seriously. i thought that was the reason you end statements with ';', so that you could use basically unlimited whitespace... doesn't that just seem refrickintarded now!

[/rant]
Reply
#7
That would throw a syntax error cha0s, the program doesn't know when the rant starts, so it can't tell us to skip it and ignore...

If only we knew before it happened Cha0s....If only we knew...

I like taco bell. Taco bell likes me. I like eating Chalupas, and spamming. Yes spamming. I like taco bell. Spiderman eats there too. I just saw white noise, now I'm bored with nothing to do!

Oh the Pirate Ninja Cowboy Hero (AKA Alexander Joseph Pritchard), please come to save me!

Oh the Pirate Ninja Cowboy Hero, please put on my clooothes!

Bam bam! Stop! Hammertime!
will Live Forever, or Die Trying >_<;;
Reply
#8
Uhh ... why don't you put this nice little white jacket on, Pritchard? It's for the best ...
stylin:
Reply
#9
Quote:i have NEVER seen a c program that was formatted as i would do it. ever

I have never seen a BASIC program that was formatted the way you would do it. Wink

Code:
? "Hello, World!"



<17 lines of white space>



sleep
EVEN MEN OF STEEL RUST.
[Image: chav.gif]
Reply
#10
um.. that isn't my normal style =p maybe if im pasting code in between other code i'll leave long whitespace 'artifacts'..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)