Hi,
I just found a bug in my code due to the following feature in Ox: you
can assign to a part of a vector another vector that is longer than that
part:
#include <oxstd.h>
main()
{
decl short_vector = constant(0, 1, 5);
decl long_vector = range(1, 2134);
short_vector[0:4] = long_vector; // This works???
print("short_vector = ", short_vector, "\n");
}
I just wanted to ask whether this is a desired feature?
Personally, after spending a couple of hours hunting my bug I would have
preferred Ox to throw a run-time error here... rather than copy the
first five elements of long_vector and leave it at that.
Regards,
Max
|