DATA statement to initialise arrays
  Home FAQ Contact Sign in
 
Advanced search
MATCHING GROUPS



more...
POPULAR GROUPS

more...

found 31 articles for 0.024 sec
Re: DATA statement to initialise arrays     

Group: comp.lang.fortran · Group Profile · Search for DATA statement to initialise arrays in comp.lang.fortran
Author: glen herrmannsfeldt
Date: Sep 19, 2008 12:55

...> dpb <none@non.net> wrote: DATA NEWVAL / MXL*MXD *0 / if ...on most systems all the initializing data goes into the object program. ...try this one: integer x(1000000) data x/1000000*1/ write(*,*) x(... using initializers in type declaration statements. (snip) On the type declaration ...the DATA statement. That is, that it usually stores all the array ...
Show full article (2.00Kb) · Show article thread
Re: DATA statement to initialise arrays     

Group: comp.lang.fortran · Group Profile · Search for DATA statement to initialise arrays in comp.lang.fortran
Author: nospam
Date: Sep 19, 2008 10:25

...> wrote: The second would be DATA NEWVAL / MXL*MXD *0 / if initialization ...prefer using initializers in type declaration statements. They are far more regular and...the initializer on the type declaration statement instead of in a parameter statement...of a DATA statement to initialize only part of an array). -- Richard Maine | Good judgement comes from...
Show full article (2.01Kb) · Show article thread
Re: DATA statement to initialise arrays     

Group: comp.lang.fortran · Group Profile · Search for DATA statement to initialise arrays in comp.lang.fortran
Author: bru
Date: Sep 19, 2008 09:24

...) PARAMETER (NTRMAX=50) LOGICAL LOST(NTRMAX) DATA LOST / NTRMAX*(.FALSE.) PARAMETER(MXL= 10, MXD= 10) DIMENSION NEwVAL(MXL,MX / 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 ...
Show full article (0.90Kb) · Show article thread
Re: DATA statement to initialise arrays     

Group: comp.lang.fortran · Group Profile · Search for DATA statement to initialise arrays in comp.lang.fortran
Author: bru
Date: Sep 19, 2008 09:14

...(NTRMAX=50) LOGICAL LOST(NTRMAX) DATA LOST / NTRMAX*(.FALSE.) PARAMETER(MXL=... the standard writing for those DATA statements? Thanks in advance Try ...(NTRMAX=50) LOGICAL LOST(NTRMAX) DATA LOST / NTRMAX*.FALSE. / PARAMETER(MXL=...MXD) DIMENSION NEWVAL(MXL,MXD) DATA NEWVAL / MXLD*0 / Kurt Thank...
Show full article (0.88Kb) · Show article thread
Re: DATA statement to initialise arrays     

Group: comp.lang.fortran · Group Profile · Search for DATA statement to initialise arrays in comp.lang.fortran
Author: Kurt Kallblad
Date: Sep 19, 2008 07:35

...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:... (NTRMAX=50) LOGICAL LOST(NTRMAX) DATA LOST / NTRMAX*.FALSE. / PARAMETER(MXL= ...
Show full article (0.75Kb) · Show article thread
Re: DATA statement to initialise arrays     

Group: comp.lang.fortran · Group Profile · Search for DATA statement to initialise arrays in comp.lang.fortran
Author: dpb
Date: Sep 19, 2008 07:25

...> 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? DATA LOST / NTRMAX* .FALSE. The second would be DATA NEWVAL / MXL*MXD *0 / if initialization ...
Show full article (0.96Kb) · Show article thread
Re: DATA statement to initialise arrays     

Group: comp.lang.fortran · Group Profile · Search for DATA statement to initialise arrays in comp.lang.fortran
Author: Arjen Markus
Date: Sep 19, 2008 07:15

...       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 / (...
Show full article (0.71Kb) · Show article thread
DATA statement to initialise arrays     

Group: comp.lang.fortran · Group Profile · Search for DATA statement to initialise arrays in comp.lang.fortran
Author: bru
Date: Sep 19, 2008 06:18

... 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
Show full article (0.40Kb)
Re: DATA statement to initialise arrays     

Group: comp.lang.fortran · Group Profile · Search for DATA statement to initialise arrays in comp.lang.fortran
Author: dpb
Date: Sep 19, 2008 10:50

...<none@non.net> wrote: The second would be DATA NEWVAL / MXL*MXD *0 / if initialization expressions allowed ...s why you can use the "*" in a PARAMETER statement. But initialization expressions aren't what are allowed in DATA. ... Yeah, I had a "DOH" moment some time...Like you, I've gotten away from using DATA almost exclusively, so combined w/ the rustiness that...
Show full article (0.86Kb) · Show article thread
Re: Opinions on thread-safety-ness of DATA statement initialisations in a module     

Group: comp.lang.fortran · Group Profile · Search for DATA statement to initialise arrays in comp.lang.fortran
Author: glen herrmannsfeldt
Date: Oct 22, 2007 14:18

... prefer to not read this data from a file. Because the...real(fp) :: absorber(NLEV,NABS) data absorber(:,1) / & 4.76282998E-01_fp...96708261E+00_fp, & .... 1.90267237E+01_fp / data absorber(:,2) / & ...etc... / ...etc... The...from the module data to dummy argument arrays. As far as...to how to use data statements to initialise variables in modules...
Show full article (2.06Kb) · Show article thread
1 · 2 · 3 · 4 · next