FORTRAN 77 Language Reference

Arrays Only

The forms r*c and r* can be used only with an array.

The form r*c stores r copies of the constant c into an array, where r is a nonzero, unsigned integer constant, and c is any constant.

Example: NAMELIST with repeat-factor in data:

* nam3.f Namelist "r*c" and "r* " 	REAL PSI(10) 	NAMELIST /GRID/ PSI 	WRITE ( *, * ) 'Input?' 	READ ( *, GRID ) 	WRITE ( *, GRID ) 	END 

The input for nam3.f is:

¤$GRID PSI = 5*980 $

The program, nam3.f, reads the above input and loads 980.0 into the first 5 elements of the array PSI.

Example: NAMELIST input with some skipped data.

The other input is:

¤$GRID PSI = 3* 5*980 $

The program, nam3.f, with the above input, skips the first 3 elements and loads 980.0 into elements 4,5,6,7,8 of PSI.