Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

General Discussion

Println

I am taking a course on swift. Whenever I try to use the println function in playground this message appears.

Playground execution failed: /var/folders/1x/400wqsqd0xd49yq1bssh9xxh0000gn/T/./lldb/4622/playground45.swift:6:1: error: 'println' has been renamed to 'print' println("Hi") ^~~~~~~ print Swift.println:2:13: note: 'println' has been explicitly marked unavailable here public func println<T>(value: T)

2 Answers

Yes, the println statement has been removed I believe as when you print something normally

print("Hello")

in the results window/pane area it has a /n next to it, indicating that in the new Xcode or Swift version they've made it easier.

Thank you. Your answer is very kind

welcome ;)

Hi!

As the message you received pointed out the 'println' function was renamed to just 'print'. There was quite a lot of things that changed with version 2 of Swift and I would recommend that you work on the iOS Development with Swift 2.0 Track as it takes into account all the updates made to Swift since version 2 released.

I hope I managed to help you out! If you have any more questions then don't hesitate to ask them.

-Luke

Thank you! Will switch courses.