Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ qsort(3f) — Ultrix FORTRAN 1.0 RISC

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

qsort(3)

qsort(3f)  —  RISC

NAME

qsort − quick sort

SYNTAX

subroutine qsort ( array, len, isize, compar )
external compar
integer[*2] compar

DESCRIPTION

One dimensional array contains the elements to be sorted.  len is the number of elements in the array.  The isize argument is the size of an element, typically -

4integer and real

8double precision or complex

16double complex

(length of character object)
character arrays

The compar argument is the name of a user supplied integer or integer*2 function that will determine the sorting order.  You must declare compar as external with the external statement to be recognized as a function.  This function will be called with 2 arguments that will be elements of array.  The function must return -

negative if arg 1 is considered to precede arg 2

zero if arg 1 is equivalent to arg 2

positive if arg 1 is considered to follow arg 2

On return, the elements of array will be sorted. 

FILES

/usr/lib/libU77.a

SEE ALSO

qsort(3)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026