tags:

views:

30

answers:

2

I have stored var name in another var and I want to retrieve values from original var.

for ex:

var var_A: list of uint = {1,3,2};
var var_A_str:string = "var_A";

//Now i want to print var_A list of values using var_A_str. How can i do that?

print $var_A_str;
+1  A: 
Ross Rogers
hi Ross, thanks for your answer but with "print rf_i;" statement, is it printing all list values stored in A?
Dan
No, `rf_i` is a reference to the reflection object for field A. You'll have to figure out how to tease out the data from that reflection field. Specman's reflection interface is a real pain. Not like the ease of working with Python's introspection.
Ross Rogers
A: 

hi Ross, thanks for your answer but with "print rf_i;" statement, is it printing all list values stored in A?

Dan