5 ms·
I remember being really intrigued when I ran into Fortran programs that used negative array indices. It's pretty handy in a lot of situations.
by codezero 9y ago
I remember being really intrigued when I ran into Fortran programs that used negative array indices. It's pretty handy in a lot of situations.
- Cyph0n 9y agoIt's commonly used in Python too: >> last_elem = arr[-1] >> rev_arr = arr[::-1] # Reverse array