Commas at line end in Swift -


in swift xcode autocorrect keeps forcing me add comma @ end of line, don't know why or comma doing. commas @ end of line do? looked , found lots on comma use in phrase separate different values in function example, nothing why comma or used @ end of terminating line of code. code xcode wanted add comma (the comma @ end xcode):

var firstrandomnumber = int(arc4random_uniform(uint32(playerarray.count)), 

is glitch or there i'm missing?

thanks

basically it's bug in fix-it , compiler's interpretation of mistake. mistake really you've forgotten final right parenthesis:

var firstrandomnumber = int(arc4random_uniform(uint32(playerarray.count)))                                                                          ^ 

but compiler doesn't quite grasp that, , interprets missing comma:

enter image description here

these messages might improved in future version of swift.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -