aqualectrix
Member
"new <record_type>()" function does not accept map type values for map type members
There are, as far as I know, two ways to populate a record in ASH. The first is to create the record, then assign values to each member of the record. The second is to create the record with the new <record_type>() function, a sort of constructor to which you can pass values for each member. These methods should be equivalent, as in this example:
However, running this code gives me the following error message:
boolean [int] found when boolean [int] expected for field #3 (c) (aaa.ash, line 16)
Er, yes, I passed you a boolean[int], which was what you expected? I'm not sure what else it might possibly want. If I'm just crazy and am doing something wrong, please let me know how I should be doing it!
This is in r8541, the most current build as of this writing.
There are, as far as I know, two ways to populate a record in ASH. The first is to create the record, then assign values to each member of the record. The second is to create the record with the new <record_type>() function, a sort of constructor to which you can pass values for each member. These methods should be equivalent, as in this example:
Code:
record t
{
int a;
string b;
boolean [int] c;
};
boolean [int] foo;
foo[1] = true;
t bar;
bar.a = 7;
bar.b = "blah";
bar.c = foo;
t baz = new t(7, "blah", foo);
However, running this code gives me the following error message:
boolean [int] found when boolean [int] expected for field #3 (c) (aaa.ash, line 16)
Er, yes, I passed you a boolean[int], which was what you expected? I'm not sure what else it might possibly want. If I'm just crazy and am doing something wrong, please let me know how I should be doing it!
This is in r8541, the most current build as of this writing.