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: Kurt Kallblad
Date: Sep 19, 2008 07:35

"bru" wrote in message
news:gb08rh$4bv$1@ccpntc8.in2p3.fr...
> 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

Try with:

PARAMETER (NTRMAX=50)
LOGICAL LOST(NTRMAX)
DATA LOST / NTRMAX*.FALSE. /

PARAMETER(MXL= 10, MXD= 10)
PARAMETER(MXLD = MXL*MXD)
DIMENSION NEWVAL(MXL,MXD)
DATA NEWVAL / MXLD*0 /

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