Mercurial > repos > rhope
comparison dict.rhope @ 97:fa437d23bb24
fix memory corruption bug
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 03 Aug 2010 22:38:25 -0400 |
parents | e73a93fb5de1 |
children | e09c2d1d6d5b |
comparison
equal
deleted
inserted
replaced
96:5a08705f7610 | 97:fa437d23bb24 |
---|---|
236 out,none <- [[dict]Right >>]_Next[key, keyidx, newkey] | 236 out,none <- [[dict]Right >>]_Next[key, keyidx, newkey] |
237 } | 237 } |
238 } | 238 } |
239 } | 239 } |
240 | 240 |
241 _Print Seq[dict,key] | 241 _Print Seq[dict,key:out] |
242 { | 242 { |
243 val <- String[[dict]Index[key]] | 243 val <- String[[dict]Index[key]] |
244 Print[ [[["\t"]Append[String[key]]]Append[":\t"]]Append[val] ] | 244 Print[ [[["\t"]Append[String[key]]]Append[":\t"]]Append[val] ] |
245 { | 245 { |
246 [dict]Next[key] | 246 ,out <- [dict]Next[key] |
247 { | 247 { |
248 _Print Seq[dict, ~] | 248 out <- _Print Seq[dict, ~] |
249 } | 249 } |
250 } | 250 } |
251 } | 251 } |
252 | 252 |
253 Print@Dictionary[dict:out] | 253 Print@Dictionary[dict:out] |
254 { | 254 { |
255 Print["Dictionary"] | 255 Print["Dictionary"] |
256 { _Print Seq[dict, [dict]First] } | 256 { out <- _Print Seq[dict, [dict]First] } |
257 } | 257 } |
258 | 258 |
259 Print@Empty Dictionary[dict:out] | 259 Print@Empty Dictionary[dict:out] |
260 { | 260 { |
261 Print["Dictionary\n\t{Empty}"] | 261 out <- Print["Dictionary\n\t{Empty}"] |
262 } | 262 } |
263 | 263 |
264 Length@Empty Dictionary[dict:out] | 264 Length@Empty Dictionary[dict:out] |
265 { | 265 { |
266 out <- 0 | 266 out <- 0 |