- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to compile an old code. I need array indexes to start at zero. How do I accomplish this?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page