Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

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

alexismor
Beginner
503 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
503 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
503 Views
I suppose the dimension(:,:) version is best suited to declaration of multiple arrays of same size and shape.
0 Kudos
alexismor
Beginner
503 Views
Ok, thanks! It's good to know.

Cheers,

Alexis
0 Kudos
Reply