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
Add an built in array slicing method.
A slice has this type: identifier [&] identifier
A slice literal has this format: expression[range literal]
Idea:
i32 [] test;
i32 var1 = test[0]; // element 0
i32 [&] vars = test[0..5]; // elements 0 to 4
i32 [&] vars = test[..]; // all elements
i32 [&] vars = test[..5]; // elements 0 to 4
i32 [&] vars = test[5..]; // elements 5 to end
The text was updated successfully, but these errors were encountered:
Add an built in array slicing method.
A slice has this type:
identifier [&] identifier
A slice literal has this format:
expression[range literal]
Idea:
The text was updated successfully, but these errors were encountered: