Re: named array
- Posted by BRyan Sep 02, 2013
- 2274 views
Does this help ?
This only uses 3 rows and the columns expand for as long as you need too.
You can use Object = repeat{{},50) or what ever size you want for rows
-- test.exw file constant X=1, Y=2, Z=3 object Object Object = {{},{},{}} -- first Object[X] = append(Object[X],100) Object[Y] = append(Object[Y],-200) Object[Z] = append(Object[Z],"test Z") -- second Object[X] = append(Object[X],"abcd") Object[Y] = append(Object[Y],-2000) Object[Z] = append(Object[Z],7077) procedure put_out(object o) if atom(o) then printf(1,"%d\n",{o} ) else printf(1,"%s\n",{o} ) end if end procedure put_out(Object[Y][1]) put_out(Object[X][1]) put_out(Object[Z][1]) put_out(Object[Y][2]) put_out(Object[X][2]) put_out(Object[Z][2]) if getc(0) then -- pause end if