Re: named array

new topic     » goto parent     » topic index » view thread      » older message » newer message

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 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu