There are two forms of initialization in Fortran: explicit and default initialization.
In the snippet provided there is no initialization of any form, so the array data
has no initial value (in part or in whole). The array and the components would be initially undefined.
Default initialization would look like
type bar
integer :: high = -1
integer :: low = -1
end type
and in such a case an object of that form would have initial values for those components unless explicit initialization overrides them
Explicit initialization for the object array
would look like
type(bar), ... :: array = expr
for a suitable (constant) expression expr
.
In your case, a scalar constant expression bar(-1,-1)
uses the default structure constructor to specify an object with components set to those values. This is a valid constant expression. The scalar expression is then used to set the value for each element of the array.
This would have the same effect as with the above default initialization, but more generally could provide other values, and we can provide (conformable) array expressions for the initial values.
Default and explicit initialization may occur in modules or elsewhere without changing the above.
As noted in Vladimir F's answer, using explicit initialization gives the initialized object the save
attribute. Default initialization does not.