CLRS pseudocode involving both subscripting and property access of a data structure In Introduction to Algorithms, the stack data structure's enqueue operation has the following pseudocode

ENQUEUE(Q,x)
Q[Q.tail] = x
if Q.tail == Q.length
    Q.tail = 1
else Q.tail = Q.tail + 1


I started writing it in Swift and figured the queue should be modeled as a structure

struct IntQueue {
    var items = [Int]()
    var head = 0
    var tail = 0
}

func enqueue(queue: IntQueue, item: Int) {

}


to be able to access the head and tail properties. However, I'm not sure why the pseudocode subscripts Q directly. Is this shorthand for subscripting a queue's nested array property rather than the queue type itself?
In pseudocode we can use whatever convention we want, as long as the reader understands what we mean.

That said, in languages like python and C++ you can actually define the subscript operator to access the underlying array, and for such languages the pseudocode could work literally.