Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28457 Discussions

array declaration: dimension(:,:) versus A(:,:)

alexismor
Beginner
183 Views
Hi everyone,

I was wondering if there was any special reason to declare arrays like this:

integer, dimension(:,:) :: A

instead of just

integer :: A(:,:)

It seems to be that the first case is a lot more cumbersome, but I see it quite often in fortran 90 documentation. Am I missing anything?

Thanks!

Message Edited by alexismor on 08-03-2005 06:20 PM

0 Kudos
3 Replies
Steven_L_Intel1
Employee
183 Views
Just a style thing. Some people prefer to use the attribute keywords for everything, rather than some in keywords and some after the variable. Use whichever you prefer.
0 Kudos
TimP
Honored Contributor III
183 Views
I suppose the dimension(:,:) version is best suited to declaration of multiple arrays of same size and shape.
0 Kudos
alexismor
Beginner
183 Views
Ok, thanks! It's good to know.

Cheers,

Alexis
0 Kudos
Reply