Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Arrays with parameter and data statements in fortran 77

  1. Sep 20, 2006 #1
    Let's say you have an array A and a variable B (both reals). Apparently

    parameter (A = (/1.2, 3.4, .../) )

    is illegal, so you have to do

    data A /1.2, 3.4, .../

    instead. However, what if you have a statement afterwards like this?

    1 parameter (A = (/1.2, 3.4, .../) )
    2 parameter (B = A(3))

    If you change 1 to a data statement, 2 becomes illegal since you can only declare parameters with other parameters, but 1 is illegal as is. How would I declare something like this that's legal?
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted

Similar Threads - Arrays parameter data Date
Java Representation of two-dimensional arrays in the memory Dec 27, 2017
Python Array Indexing Nov 8, 2017
C/++/# Allocating a huge boolean array fails Oct 14, 2017
C/++/# Library that supports multidimensional Arrays Jul 17, 2017
Recursively sorting an array of strings w/o aux. parameter Feb 20, 2017