Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Can a namelist read a variable array?

pecan204
Beginner
465 Views
Does anyone know if a namelist can read a variable array?

I was wondering if the namelist can first read the array size then read the array values.

Thanks
0 Kudos
1 Reply
Steven_L_Intel1
Employee
465 Views
You can have an array in a NAMELIST. However, all you can do is read in values (you can use subscripting in the array reference) - you can't change the array size. For example, you could have in the input:

A(3) = 4,5,6

where this would assign to elements 3:5 (you could also say A(3:5), but not, I think, in 6.1.)

Steve
0 Kudos
Reply