Bug #3960
closed
RExpression2 - support arrayType(arrayType(....)) tokens
Added by ben leinfelder over 15 years ago.
Updated over 15 years ago.
Description
the Ptolemy expression:
{{1}, "b", {3}}
will result in a Token with type:
arrayType(arrayType(string,1),3)
We need to [recursively] handle ArrayTokens that are input to the RExpression2 actor
can now handle arrayType(arrayType(...) so that the given expression ends up looking like:
{"1", "b", "3"}
Notice that the list structure was dropped since there is only a single value for each. When the one of the inner arrays has more than a single item, the list structure is used:
{{1,2}, "b", {3}}
becomes
{{"1", "2"}, {"b"}, {"3"}}
And, yes, everything is converted to their string representation as noted in another ticket.
Why make assumptions about dropping single element list structures? Maybe I want a list of single element lists.
Original Bugzilla ID was 3960
Also available in: Atom
PDF