PB9 online Help describes multidimensional array sorting the following way:

TYPE SalesType

OrderNum AS LONG

PartNumber(1 TO 20) AS STRING * 20

END TYPE

...

DIM Sales AS SalesType

...

DIM Temp(1 TO 20) AS STRING * 20 AT VARPTR(Sales.Partnumber(1))

ARRAY SORT Temp()

ERASE Temp()

The problem is always the need of using a type outside a function.

So, if you need often to calculate a smallest/biggest value under variant conditions then you need a bunch of types. Functions with Min/Max calculations are as a consequence not simply portable.

In PB there exists a one dimensional function Min/Max, which unfortunately cannot be used with arrays. It is quite useless for common math purposes. So, why not simply implement a Min/Max function like in C++ with at least one row containing an index() array and at least one row containing a value() array with hard codable relevance to the index() array?

Currently, I have to use functions with built in bubble sorting or similiar. These are too much time consuming in some cases.

TYPE SalesType

OrderNum AS LONG

PartNumber(1 TO 20) AS STRING * 20

END TYPE

...

DIM Sales AS SalesType

...

DIM Temp(1 TO 20) AS STRING * 20 AT VARPTR(Sales.Partnumber(1))

ARRAY SORT Temp()

ERASE Temp()

The problem is always the need of using a type outside a function.

So, if you need often to calculate a smallest/biggest value under variant conditions then you need a bunch of types. Functions with Min/Max calculations are as a consequence not simply portable.

In PB there exists a one dimensional function Min/Max, which unfortunately cannot be used with arrays. It is quite useless for common math purposes. So, why not simply implement a Min/Max function like in C++ with at least one row containing an index() array and at least one row containing a value() array with hard codable relevance to the index() array?

Currently, I have to use functions with built in bubble sorting or similiar. These are too much time consuming in some cases.

## Comment