objective c - When do variables' values get defined? -


    nsstring *string1 = @"string one";     nsstring *string2 = @"string two";     nsstring *string3 = [string1 stringbyappendingstring:string2 ]; 

for current version of xcode, above snippet each string1, string2, string3 defined @ compile time or run time?

the code allocate space variables (if compiler deems necessary so) generated @ compile-time , executed @ runtime. 2 constant strings created @ compile-time well, similar constant c strings. message send not executed until runtime.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -