The questions are:- Why is it considered dangerous to use the expression a.length-1 ? - What else is proposed to implement the desired effect without warning?
No, no. My problem is: I want to access the last element of an
array and assign it to the element of same index in another array
(so I can't use $), and I checked that the source array has at
least one element.
- Avoid subtracting form .length Dom DiSc via Digitalmars-d-learn
- Re: Avoid subtracting form .... monkyyy via Digitalmars-d-learn
- Re: Avoid subtracting form .... Anonymouse via Digitalmars-d-learn
- Re: Avoid subtracting form .... Jonathan M Davis via Digitalmars-d-learn
- Re: Avoid subtracting form .... Salih Dincer via Digitalmars-d-learn
- Re: Avoid subtracting fo... user1234 via Digitalmars-d-learn
- Re: Avoid subtracting form .... matheus via Digitalmars-d-learn
- Re: Avoid subtracting form .... Manfred Nowak via Digitalmars-d-learn
- Re: Avoid subtracting fo... Dom DiSc via Digitalmars-d-learn
- Re: Avoid subtractin... Manfred Nowak via Digitalmars-d-learn
- Re: Avoid subtracting fo... Paolo Invernizzi via Digitalmars-d-learn
- Re: Avoid subtracting form .... user1234 via Digitalmars-d-learn
- Re: Avoid subtracting fo... Dom DiSc via Digitalmars-d-learn