# What does this in Associative Array LRM section 7.8 means?

**URL:** <https://verificationacademy.com/forums/t/what-does-this-in-associative-array-lrm-section-7-8-means/36731>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, associative-array, LRM-Section-78\
**Created:** [October 27, 2019, 8:17am UTC](https://verificationacademy.com/forums/t/what-does-this-in-associative-array-lrm-section-7-8-means/36731 "2019-10-27T08:17:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sankethjitta](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/sankethjitta/32/1781_2.png) [@sankethjitta](https://verificationacademy.com/forums/u/sankethjitta)\
**Post date:** [October 27, 2019, 8:17am UTC](https://verificationacademy.com/forums/t/what-does-this-in-associative-array-lrm-section-7-8-means/36731/1 "2019-10-27T08:17:52Z")

</div>

1. index\_type of Associative array :- It shall be illegal for index\_type to declare a type.
2. An entry for a nonexistent associative array element shall be allocated when it is used as the target of an assignment or actual to an argument passed by reference.  
I wanted to get the meaning of this lines.

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [October 28, 2019, 6:32am UTC](https://verificationacademy.com/forums/t/what-does-this-in-associative-array-lrm-section-7-8-means/36731/2 "2019-10-28T06:32:23Z")

</div>

_In reply to [sankethjitta](https://verificationacademy.com/forums/t/what-does-this-in-associative-array-lrm-section-7-8-means/36731):_

1. This prevents so-called anonymous types like   
int AA[enum {ON, OFF}]. Same for   
structs. You need to use a   
typedef first.
2. Associative array elements get created on the first write to that element. But if you pass an associated array element as an argument to a function/task passed by reference, SystemVerilog has to create the element regardless of whether the routine writes to it.
