- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How about this?
[fortran]integer, parameter :: MUL = 7
integer :: i, a(3) = (/(i,i=1,3)/)*MUL
write(*,*)a
end[/fortran]
OR, equivalently,
[fortran]
integer, parameter :: MUL = 7
integer :: i, a(3) = [1:3]*MUL
write(*,*)a
end
[/fortran]

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