Correct use of : instead of ; in array indexing