- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
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
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suppose the dimension(:,:) version is best suited to declaration of multiple arrays of same size and shape.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, thanks! It's good to know.
Cheers,
Alexis
Cheers,
Alexis
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page