MemCom Reference Manual > MemCom ftn Fortran API > Sparse Table Functions > mcf_st_row_sort

Name

mcf_st_row_sort — Sort the non-empty cells of a row of a sparse-table dataset

Synopsis

subroutine mcf_st_row_sort(dsid,row_index,sorting_mode,status)
integer*4 dsid
integer*8 row_index
integer*4 sorting_mode
integer*4 status

Description

mcf_st_row_sort sorts, for the sparse-table dataset identified by dsid, the non-empty cells of the row identified by row_index according to the sorting_mode parameter.

Parameters

dsid (input)

Dataset identifier.

row_index (input)

Row index, starting at 1.

status (output)

Status code returned (output). If completed successfully, 0 is returned. Otherwise, a negative value indicating the MemCom error number is returned.

sorting_mode (input)

Defines the sorting mode. Valid choices are:

  • 1: Sort the cells by the column name in ascending order.

  • 2: Sort the cells by the column name in descending order.

  • 3: Sort the cells by the column index in ascending order.

  • 4: Sort the cells by the column index in descending order.

status (output)

f no error occurred, 0 is returned. Otherwise, a negative value indicating the MemCom error number is returned.

See Also

mcf_st_dataset_clear

mcf_st_cell_find_next

mcf_st_cell_set

mcf_st_row_num_cells