Baanboard.com

Go Back   Baanboard.com

User login

Frontpage Sponsor

Main

Baanboard at LinkedIn


Poll
What actions do you take to ensure compliance with the sanction/embargo lists published by the EU and the US?
don't know what you are talking about
55%
we are scanning customers, suppliers and employees using own programs on a regular basis
12%
each delivery/purchase adress is checked immediately with own programs
2%
we are using third party software for this purpose
10%
we simply don't bother
20%
Total votes: 49

Reference Content

 
qss.sort()
By patvdv at 26 Feb 2008 - 21:57


qss.sort()

Syntax

long qss.sort( ref void array, ref long def [, long dept] )

Description

This function performs a fast sort a specified array.

Arguments

array

The name of the array to be sorted.

def

This determines how the array is to be sorted. The argument must be declared as follows:

long def(x,4) | x is the number of sort fields

You can define several sort fields (1 to x). When performing a sort, the system sorts on the first sort field. Then, if there are duplicate values in the first sort field, the system sorts on the second sort field, and so on.

For each sort field, you define the four sort properties by using the following functions. In each case, the field_number argument specifies the sequence number (1 to x) of the sort field.

  • void qss.start( ref long def, long field_number, long position )

    This specifies the start position of the sort field in the array elements.

  • void qss.way( ref long def, long field_number, long way )

    This defines the sort order. The argument way can be set to QSS.UP (ascending sort) or QSS.DOWN (descending sort).

  • void qss.type( ref long def, long field_number, long type )

    This specifies the sort field's type, for example. DB.LONG, DB.DOUBLE, DB.STRING, DB.DATE, and so on.

  • void qss.length( ref long def, long search_condition, long length )

    This specifies the length of the sort field. This option is valid only when sorting strings.

    If you define fewer sort fields than you have declared, you must close the def argument by calling qss.start() with a start position of zero. For example, if you have declared three sort fields, as follows:

    def(3,4)

    but then create only two sort fields, you must close the definition with the following call:

    qss.start(def,3,0)

dept

This indicates the number of array elements to be sorted if the function is not intended to sort the entire array. By default, the function sorts the entire array.

Return values

0 success
-1 error
-11 def is not of type long array or array not of type array
-13 dept must be positive
-14 def argument not correctly declared
-16 QSS.TYPE not correct
-17 array argument not correct
-18 no definition found in def

Context

Bshell function.

Related topics


0
No votes yet


All times are GMT +2. The time now is 00:47.


©2001-2008 - Baanboard.com - Baanforums.com