phase: 20.49 COMPLETE; 20.50 Flow+String minimal reps; 20.51 selfhost v0/v1 minimal (Option A/B); hv1-inline binop/unop/copy; docs + run_all + CURRENT_TASK -> 21.0
This commit is contained in:
16
examples/semantics_test_array.hako
Normal file
16
examples/semantics_test_array.hako
Normal file
@ -0,0 +1,16 @@
|
||||
// Semantics test - Array operations
|
||||
|
||||
static box Main {
|
||||
main() {
|
||||
local arr, value
|
||||
arr = new ArrayBox()
|
||||
|
||||
// ArrayGet/ArraySet test
|
||||
arr.push(10)
|
||||
arr.push(20)
|
||||
arr.push(30)
|
||||
|
||||
value = arr.get(1) // Should be 20
|
||||
return value
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user