comparison modules/array.tp @ 366:810b6115c1d4

Add a pop method to array
author Michael Pavone <pavone@retrodev.com>
date Sat, 08 Aug 2015 21:13:26 -0700
parents 884cd5d54c0f
children 93c28eee141e
comparison
equal deleted inserted replaced
365:3d36d69aab7f 366:810b6115c1d4
51 data <- tmp 51 data <- tmp
52 } 52 }
53 data set: size value 53 data set: size value
54 size <- size + 1 54 size <- size + 1
55 self 55 self
56 }
57
58 llMessage: pop withVars: {
59 } andCode: {
60 if: size > 0 {
61 size <- size - 1
62 data get: size
63 } else: {
64 false
65 }
56 } 66 }
57 67
58 llMessage: resize withVars: { 68 llMessage: resize withVars: {
59 newsize <- obj_uint32 ptr 69 newsize <- obj_uint32 ptr
60 tmp <- (object ptr) ptr 70 tmp <- (object ptr) ptr