Array indexing and slicing

novice2 novice2_member at pathlink.com
Wed Apr 5 03:37:55 PDT 2006


>>i just want to say, IMHO, all changes in index/slicing syntax will change
>>compiler only. not generated binary.
>
>Actually I don't think that can be true. That would only be the case if the
>indexes were defined at compilation time. Assuming positive indexes only, the
>following code...

but programmer defines algo - sequence of some operations.
we should compare equal code for currnet syntax and new syntax.
equal code - with equal results.

just imaginary example:

task: get 3rd item from end in array;
new synatx: b = a[-3];
old syntax: b = a[length-3];

only now we can compare, wich actions will be performed in runtime,
and guess, will be it different or not.





More information about the Digitalmars-d mailing list