From: Robert Klemme Date: 2004-09-14T17:49:53+09:00 Subject: Re: Recursive Objects (Arrays) in Ruby "Wandering Mango" schrieb im Newsbeitrag news:ci5q1d$a9b@odah37.prod.google.com... > As a disclaimer, I'm new to object-oriented programming and to Ruby; so > I'm not sure if I'm even describing this problem correctly. Here goes: > > I have an object called "formula" which has properties .string (the > original formula), .leftSub, .rightSub (left and right subformula of > the original formula) and .characterType (an array identifying each > character in .string as being a particular type - e.g., number, letter, > and so on). Assaph answered your problem question, but I'd like to raise another question: this looks like an expression tree - possible as outcome of a parse stage. It seems to me that the more appropriate storage would be (besides the original string) a sequence of tokens per node. Just my 0.02 robert