Assertion error with improper symbolic subscripts

23 views
Skip to first unread message

Brian Deters

unread,
Jun 5, 2013, 3:45:25 PM6/5/13
to pawns...@googlegroups.com
I believe I have found an interesting assertion that may deserve better error checking. I have already sent an email to Thiadmer, but I thought it might be of some use to the community.
It turns out that if you use a number for a symbolic subscript that is NOT the first subscript, it throws an assertion. However, if this is the first subscript, it throws proper errors. Here is a small example the exhibits the problem:

main()
{
    new field[.type, .0] //throws assertion
    //new field[.0, .type]  //throws error 29: invalid expression
}

This happened to me when I accidentally had a #define that shared the same symbol name as a subscript symbol.

-Brian

Reply all
Reply to author
Forward
0 new messages