+ 7
Does the Swift tutorial here not have a section on getting console user input?
Is it not possible to get console user input in Swift?
9 Antworten
+ 6
+ 6
Yes I just reviewed that the input lesson was not available... strange but true unless I missed it. Generally yes the app is usually complete and laid out.
+ 5
ive been having this issue as well, ive used readline but then the compiler would yell at me when i try to manipulate or do whatever with the input
+ 4
Google tells me to use readLine()
+ 4
Alexandr thanks. What do the exclamation marks do after readLine()! and Int()! ?
+ 4
Sonic without the exclamation it will display optional in the console
+ 4
Am I right in observing that this information is not available in the Sololearn Swift tutorial? Is it because console user input is not a major part of Swift?
+ 3
BroFar thanks.
+ 2
For int use Int(readLine()!)!