Re: DATA statement to initialise arrays
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: DATA statement to initialise arrays         

Group: comp.lang.fortran · Group Profile
Author: Arjen Markus
Date: Sep 19, 2008 07:15

On 19 sep, 15:18, bru wrote:
> Hello,
>
>         I'm using Sun f77 and pgf77 compiler and both the following sequences
> does not work!!  (It comes from a legacy code)
>
>       PARAMETER (NTRMAX=50)
>       LOGICAL LOST(NTRMAX)
>       DATA LOST / NTRMAX*(.FALSE.)
>
>       PARAMETER(MXL= 10, MXD= 10)
>       DIMENSION NEwVAL(MXL,MXD)
> /    DATA NEWVAL / (MXL*MXD)*0/
>
> which is the standard writing for those DATA statements?
>
> Thanks in advance

This line:
/ DATA NEWVAL / (MXL*MXD)*0/

should read:
DATA NEWVAL / (MXL*MXD)*0/

(I am not sure the (MXL*MXD) will work though, you may
need to replace that by the result, 100)

Regards,

Arjen
no comments
diggit! del.icio.us! reddit!