Jump to content

Array: Difference between revisions

Line 232:
 
"an new created array with 5 elements computed from expressions (at run time)"
a3 := { 10 . 20 . (a1 at:3) . 40 squared }.</lang>
 
<lang smalltalk>"access by index (notice: in Smalltalk index starts at 1)"
accessing:
<lang smalltalk>"access by index (notice: in Smalltalk index starts at 1)"
a1 at:2. -> 20
a1 at:index put:100. -> error; immutable
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.