|
|
Why was SPREAD left out of initialization expressions?
I know RESHAPE is allowed in Fortran-95+ initialization expressions,
but why is its "cousin" SPREAD not allowed?
Al Greynolds
www.ruda-cardinal.com
|
|
0
|
|
|
|
Reply
|
Al
|
6/17/2010 7:09:29 PM |
|
On 6/17/10 2:09 PM, Al Greynolds wrote:
> I know RESHAPE is allowed in Fortran-95+ initialization expressions,
> but why is its "cousin" SPREAD not allowed?
>
> Al Greynolds
> www.ruda-cardinal.com
I'm not sure there is an answer (other than "that's the way people
voted"). The list of allowed transformational intrinsics was
kept "small" to avoid making compile-time computations more
"complicated" than "necessary". Probably nobody asked about
SPREAD or, if they did, it didn't make the cut to keep the list
small.
In Fortran 90 and 95 constant expressions and initialization
expressions were (hopelessly, IMO) muddled in the standard.
The term "constant expression" was never really used in F95, other
than as a way to describe other constant expressions (an array
constructor where every term in a constant expression is a
constant array constructor, duh!). Whenever a value actually
had to be known at compile-time, "initialization expression" was
used.
By F2003 the term "constant expression" was removed from the
standard in favor of initialization and specification
expressions. And both forms allow any intrinsic function as
long as the arguments are restricted enough.
IN F2008, constant expressions are back and initialization
expressions are out. All of the reasonable transformational
intrinsics are allowed in constant expressions.
Stay tuned for the F2013 expression names!
Dick Hendrickson
|
|
0
|
|
|
|
Reply
|
Dick
|
6/17/2010 9:12:21 PM
|
|
|
1 Replies
198 Views
(page loaded in 0.046 seconds)
Similiar Articles: how to assign a NaN? - comp.lang.fortranWhen negatives are possible then you are left ... variables but not of real variables in initialization expressions. ... that > the "unlikely" value might turn out to ... Conversion to non-scalar type - comp.lang.c++.moderated> Because you are probably doing copy initialization ("=" form). Try Indices i ... You will get messages about conversion difficulties if what is on the left-hand ... Where did Fortran go? - comp.lang.fortran... few years they shredded what they had left. I ... sneaked in. (PARAMETER with non-integer initialization expressions ... when the OS doesn't supply a way to find out? Why ... Could anyone give me the spice-mode.el - comp.emacsHi, All I am new to *NIX and I am thinking of writing spice code under Emacs. However, I have no idea of Emacs Lisp. Hence, I could not write a packa... Neatest way to get the end pointer? - comp.lang.c... but I've gotten so sick of writing it out that ... will forget to change it in the pointer initialization ... Error: The expression to the left of the equals sign is not a ... Need a FORTRAN compiler for Win7 (or XP) - comp.lang.fortran ...The left margin does not line up well. I'm copying ... They aren't separated out by what particular ... ugcs.caltech.edu> wrote: > Second, evaluating expressions ... Calibrating FFT results, amplitude in to magnitude out - comp.dsp ...... ran across others= in which one integral was left ... with 'e' and found them to be a beautiful expression of ... energy of the signal is diminished by being spread out ... improve strlen - comp.lang.asm.x86:) Out of curiousity, what happened to "repne scasb"? ... in 2003, the basic principle is that when we have expression ... This is left over 1990s technology when earlier than ... DSP Job opening in Sacramento, CA - comp.dspIt seems like my expression made things rather unclear and ... bokm l", used to designate the most wide-spread ... Dubya: > [snip wondrous illiteracies] You left out one ... c5180 ink system failure 0xc18a0306 - comp.periphs.printers ...Once the initialization process is complete, the printer will print out a Diagnostic Page. ... you enter by pressing the "<" (left ... m writing this down is to spread hope ... c++ - Why can't I have a non-integral static const member in a ...I suspect that floating point was left out of these types of constant expressions simply because they ... Why is initialization of integer member variable (which is not const ... Brian W. Kernighan: Programming in C: A Tutorialfor( initialization; expression; increment) ... may be done zero times. If the expression is left out ... structure lets us rearrange this spread-out ... 7/25/2012 2:43:05 AM
|
|
|
|
|
|
|
|
|