Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Objective-C Basics (Retired) Fundamentals of C Variables

Float

what is "float"... is it a variable? if so how is it defined? is there a sheet of variables and definitions?

1 Answer

Jeroen de Vrind
Jeroen de Vrind
29,772 Points

Float is a datatype. It's a number with decimals like 0,123456. In Swift you can declare a variable of type float with a value of 0,12 for example as var nameOfVariable: Float = 0,12 in Objective C as: float nameOfVariable = 0,12 or when you want a property @property(nonatomic,assign) float nameOfVariable In the video of C fundamentals it should be explained somewhere.