|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
在标准的12.4.2中:
Elements of dynamic arrays, queues, and associative arrays that are passed by reference may get removed
from the array or the array may get resized before the called function or task completes. The specific array
element passed by reference shall continue to exist within the scope of the called tasks or functions until they
complete. Changes made to the values of array elements by the called task or function shall not be visible
outside the scope of those tasks or functions if those array elements were removed from the array before the
changes were made. These references shall be called outdated references.
那如果变成了outdated reference会怎么样?????
还有, 我怎么样直接传参数给一个"queue of string"
例如, 定义一个functionAAA, 参数为string的queue类型sq[$]
virtual function void AAA (string sq [$])
...
endfunction
调用这个function的时候, 如果我写
AAA({"SSS"});
他报错说:
formal and actual do not have assignment compatible data types (expecting datatype compatible with 'queue of string' but found 'packed array' instead).
我应该怎么写? |
|