You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inox slices are equivalent to Go slices. They are the primary way to create a sequence containing instances of a struct type.
Slices are not serializable.
struct Token {
kind int
start int
end int
}
# allocate and initialize a slice of length 3 on the module's heap
tokens = [:]Token{{0, 3, 4}}
# allocate a slice on the module's heap
tokens = new([:]Token, 10)
# append a token at the end of the slice, should it work like Golang's append ?
tokens = appendto(tokens, Token{0, 3, 4})
# equivalent
appendto(&tokens, Token{0, 3, 4})
The text was updated successfully, but these errors were encountered:
Inox slices are equivalent to Go slices. They are the primary way to create a sequence containing instances of a struct type.
Slices are not serializable.
The text was updated successfully, but these errors were encountered: