Jump to content

Array: Difference between revisions

160 bytes added ,  7 years ago
Line 42:
 
===[[Fortran]]===
Arrays have been available from the start, for each of the allowed types of variables: integer, real, complex, and their different precisions. They can be indexed only with integer values, and definitely not with text strings as in say Snobol - though one could place a short text into a small CHARACTER variable that is equivalenced to an INTEGER variable and use that integer, possibly to good effect. Indexing starts with one, and the size is fixed by the declaration at compile time, thus <lang Fortran> REAL A(66) !Declares an array, elements one to sixty-six.
A(3) = 1.1 !Assigns a value to the third element of A.
A(2) = 1.1
1,220

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.