- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In a pure routine I would need to sort a real array. However, I can't call SORTQQ without removing the pure modifier from the calling procedure as SORTQQ is not marked to be pure.
Is there a reason it is not pure or is it just by accident?
Using ifort 2020.4 on Windows
.::Antti::.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sortqq is some really old legacy routine. There are many freely available sorting routines that can be downloaded. I would suggest picking one that suits your needs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
!
! Sort a 1-D array
USE IFPORT
INTEGER(2) array(10)
INTEGER(2) i
DATA ARRAY /143, 99, 612, 61, 712, 9112, 6, 555, 2223, 67/
! Sort the array
Call SORTQQ (LOC(array), 10, SRT$INTEGER2)
! Display the sorted array
DO i = 1, 10
WRITE (*, 9000) i, array (i)
9000 FORMAT(1X, ' Array(',I2, '): ', I5)
END DO
END
The sortqq sample does not work as published. This works ok. Mainly missing carriage returns in original.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, thanks for the info. I was looking at sortqq as something already provided by the compiler / runtime is in my mind preferable to something I need to get from elsewhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error in the example that John reported is fixed in the next release later this spring.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page