Vyacheslav
Vyacheslav

Reputation: 27221

long long constant number in swift

I'm looking Swift alias for Objective-C constant long long int and float numbers.

That is, how can this : 1000LL and .1f be converted into Swift code?

No information found here:

https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/InteractingWithCAPIs.html

Upvotes: 2

Views: 3644

Answers (1)

OOPer
OOPer

Reputation: 47896

You use as-casting when you need to specify literal types in Swift.

1000LL -> 1000 as Int64

.1f -> 0.1 as Float

Upvotes: 3

Related Questions