Minimum function on characters

Gizmo

New Member
Hello everybody,

Can someone give me an explanation about the following code:

define var VC_TEST as character initial "TEST" no-undo.

minimum(",", VC_TEST) ==> gives ","

minimum("|", VC_TEST) ==> gives "|"

I don't understand why the second function gives back the "|". This string is smaller than TEST??

Thanks,

Gizmo.
 

arekp

New Member
In my Progress 4gl (v. 9.1)
minimum("|", VC_TEST) ==> gives "TEST"

Arek

Gizmo said:
Hello everybody,

Can someone give me an explanation about the following code:

define var VC_TEST as character initial "TEST" no-undo.

minimum(",", VC_TEST) ==> gives ","

minimum("|", VC_TEST) ==> gives "|"

I don't understand why the second function gives back the "|". This string is smaller than TEST??

Thanks,

Gizmo.
 

Gizmo

New Member
arekp said:
In my Progress 4gl (v. 9.1)
minimum("|", VC_TEST) ==> gives "TEST"

Arek

Oeps, my mistake.
I did have the question why it gives back TEST, because TEST is bigger then "|":u. Do you know why?

Sorry.
 

arekp

New Member
Function minimum sort chracter values like dictionary. First function compare first characters of two values. If they are the same finction will compare next characters.
In your example "T" is smaller then "|".
ASC("T") = 84
ASC("|") = 124

Arek

Gizmo said:
Oeps, my mistake.
I did have the question why it gives back TEST, because TEST is bigger then "|":u. Do you know why?

Sorry.
 
Top