Software Archive
Read-only legacy content

Array Index

Intel_C_Intel
Employee
381 Views
I'm trying to compile an old code. I need array indexes to start at zero. How do I accomplish this?
0 Kudos
1 Reply
Steven_L_Intel1
Employee
381 Views
Um, if the old code is Fortran, array indexes start by default at 1 - always have. You can specify a zero origin when you declare the array, for example:


REAL MYARRAY(0:99)


There is no "switch" to magically change the origin to zero.

Steve

0 Kudos
Reply