In Objective-C, what does a comma do when used as a statement separator?

前端 未结 3 1267
春和景丽
春和景丽 2021-02-12 16:22

I am looking though some source code from a third party and am repeatedly seeing a syntax that is new to me. Basically they are separating statements with commas instead of semi

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-12 17:02

    These are comma separated expressions and are evaluated from left to right, with the result of the entire expression being the last expression evaluated.

提交回复
热议问题