About OpenCASCADE array sequence start value

Array of C / C ++ is counted from 0, 5 array of values ​​corresponding to the index will be 0, 1, 2, 3, 4.

The number may not be so in mathematics, I know List 1 in the Mathematica from the beginning as the next target.

OpenCASCADE concept closer to the subject of mathematics at an early design an array, starting at 1, which was significantly associated with C / C ++ language standard is different, so each had to re-design the array, and then gave the order to be compatible array class defines a Lower subscript , Upper index; array subscript should be to from lower Upper (both boundary value).

Compatible Lower, Upper subscript so that was in use always refreshing , and there are many places you can see inside the code assumes the array begins with 1 count under the subject, evidently not hard to modify all over, so if the Lower count is set to zero, although done with the equivalent C / C ++, but to use the equivalent of buried mines, Zhibuding when you give a pointer to cross-border, we should not try .

Then again, really not used to array index is calculated from the beginning; superfluous to put forward a Lower, Upper subscript, came up with unnecessary complexity, I feel this is not enough to close OpenCASCADE language, tasteless design.

Guess you like

Origin www.cnblogs.com/bitbybit3d/p/11946595.html