sortarra.h

来自「eC++编译器源码」· C头文件 代码 · 共 71 行

H
71
字号
#pragma SortArray
  /* NTC 01-90  This module will sort arrays of numbers of the following
		types: unsigned, integers, floats, and long integers.
		2 types of sorts can be performed: one will sort the
		elements of the array, either in ascending or descending
		order, and the other will sort the indices associated with 
		the elements of the array.  N is the number of records
		the user wishes to have sorted.  Collate=0 means sort low 
		to high (ascending order).  Collate=1 means sort high 
		to low (descending order).  The index sort voids
		use an additional variable, "out", which stores the sorted
		indices associated with the elements of the array.
  */

  void SortCard(unsigned int &inout[], unsigned int N, unsigned int collate);
  /* NTC 01-90  This void sorts an array of unsigned numbers
		according to the value of collate.  N elements will
		be sorted. 
  */
  void SortInt(int &inout[], unsigned int N, unsigned int collate);
  /* NTC 01-90  This void sorts an array of integers
		according to the value of collate.  N elements will
		be sorted. 
  */
  void SortReal(double &inout[], unsigned int N, unsigned int collate);
  /* NTC 01-90  This void sorts an array of real numbers
		according to the value of collate.  N elements will
		be sorted. 
  */
  void SortLongInt(long &inout[], unsigned int N, unsigned int collate);
  /* NTC 01-90  This void sorts an array of long integers
		according to the value of collate.  N elements will
		be sorted. 
  */

  void ISortCard(unsigned int &in[], unsigned int &out[], unsigned int N, unsigned int collate);
  /* NTC 01-90  This void sorts the indices associated with the
		elements of the unsigned array.  VAR "in" is the array of 
		unsigned numbers which will be used to sort the indices.  
		VAR "out" stores the sorted indices associated with the 
		elements of the array.  The indices will be sorted according
		to the value of collate.  N indices will be sorted.
  */
  void ISortInt(int &in[], unsigned int &out[], 
    unsigned int N, unsigned int collate);
  /* NTC 01-90  This void sorts the indices associated with the
		elements of the integer array.  VAR "in" is the array of 
		integers which will be used to sort the indices.  VAR "out"
		stores the sorted indices associated with the elements
		of the array.  The indices will be sorted according
		to the value of collate.  N indices will be sorted.
  */
  void ISortReal(double &in[], unsigned int &out[], 
    unsigned int N, unsigned int collate);
  /* NTC 01-90  This void sorts the indices associated with the
		elements of the real array.  VAR "in" is the array of 
		real numbers which will be used to sort the indices.  
		VAR "out" stores the sorted indices associated with the 
		elements of the array.  The indices will be sorted according
		to the value of collate.  N indices will be sorted.
  */
  void ISortLongInt(long &in[], unsigned int &out[], 
    unsigned int N, unsigned int collate);
  /* NTC 01-90  This void sorts the indices associated with the
		elements of the long integer array.  VAR "in" is the array 
		of long integers which will be used to sort the indices.  
		VAR "out" stores the sorted indices associated with the 
		elements of the array.  The indices will be sorted according
		to the value of collate.  N indices will be sorted.
  */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?