|
|
Up |
|
|
  |
Author: brubru Date: Sep 19, 2008 06:18
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
|
| |
|
| | 8 Comments |
|
  |
Author: Arjen MarkusArjen 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/
|
| Show full article (0.71Kb) |
|
| | no comments |
|
  |
Author: dpbdpb Date: Sep 19, 2008 07:25
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?
DATA LOST / NTRMAX* .FALSE.
The second would be
DATA NEWVAL / MXL*MXD *0 /
|
| Show full article (0.96Kb) |
| no comments |
|
  |
Author: Kurt KallbladKurt 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
|
| Show full article (0.75Kb) |
| no comments |
|
  |
Author: brubru Date: Sep 19, 2008 09:14
Kurt Kallblad wrote:
>
> "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?
>> ...
|
| Show full article (0.88Kb) |
| no comments |
|
  |
Author: brubru Date: Sep 19, 2008 09:24
Arjen Markus wrote:
> 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,MX
>>/ DATA NEWVAL / (MXL*MXD)*0/
>>
>>which is the standard writing for those DATA statements?
>>
>>Thanks in advance
> ...
|
| Show full article (0.90Kb) |
| no comments |
|
  |
Author: nospamnospam Date: Sep 19, 2008 10:25
dpb non.net> wrote:
> The second would be
>
> DATA NEWVAL / MXL*MXD *0 /
>
> if initialization expressions allowed "*", but they don't.
Initialization expressions allow "*" just fine. THat's why you can use
the "*" in a PARAMETER statement. But initialization expressions aren't
what are allowed in DATA.
> Note the common thread there is the parentheses aren't allowed.
There are zillions of things that aren't allowed there in DATA
statements. In fact, there are a lot more things that aren't allowed
than that are. It is a special category of syntax all on its own rather
than being a subset of a more general category such as initialization
expressions. I'd think it simpler to keep track of what is allowed
rather than with what isn't, except that...
|
| Show full article (2.01Kb) |
| no comments |
|
  |
Author: dpbdpb Date: Sep 19, 2008 10:50
Richard Maine wrote:
> dpb non.net> wrote:
>
>> The second would be
>>
>> DATA NEWVAL / MXL*MXD *0 /
>>
>> if initialization expressions allowed "*", but they don't.
>
> Initialization expressions allow "*" just fine. THat'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 after I posted that I had slipped
up when I realized that the parameter does work (even though I had
walked down the wrong path earlier).
And, of course, in inimitable usenet style, it was gone and already read
by somebody else before getting back to correct own misstatement.
|
| Show full article (0.86Kb) |
| no comments |
|
  |
|
|
  |
Author: glen herrmannsfeldtglen herrmannsfeldt Date: Sep 19, 2008 12:55
Richard Maine wrote:
> dpb non.net> wrote:
>> DATA NEWVAL / MXL*MXD *0 /
>>if initialization expressions allowed "*", but they don't.
(snip)
> There are zillions of things that aren't allowed there in DATA
> statements. In fact, there are a lot more things that aren't allowed
> than that are. It is a special category of syntax all on its own rather
> than being a subset of a more general category such as initialization
> expressions. I'd think it simpler to keep track of what is allowed
> rather than with what isn't, except that...
As it hasn't been mentioned yet, be sure that you really do
want a DATA statement. Note that on most systems all the initializing
data goes into the object program. In the case of zeros it is sometimes
compressed out or otherwise doesn't take up so much space. You might
not notice at 100 but try this one:
|
| Show full article (2.00Kb) |
| no comments |
|
|