Page 1 of 1

Scalar names in table

Posted: Fri Jan 22, 2021 6:14 am
by NoGu
I want to create a table with two columns. First column should be the names of the scalars and the second column the value. Part two is solved. Is it possible to create a loop and get the names of the scalars in col1?

Re: Scalar names in table

Posted: Mon Jan 25, 2021 2:27 pm
by EViews Matt
Hello,

Sure, here's a small example.

Code: Select all

create u 1 table(3,2) t t(1,1) = "x" t(2,1) = "y" t(3,1) = "z" t(1,2) = 1 t(2,2) = 2 t(3,2) = 3 for !i = 1 to t.@rows %name = t(!i,1) scalar {%name} = @val(t(!i,2)) next

Re: Scalar names in table

Posted: Mon Feb 01, 2021 7:58 am
by NoGu
Thank you, I will try that!