<< Click to Display Table of Contents >> Navigation: ThinBASIC Core Language > BuiltIn Functions > String functions > MIN$ |
Description
Return the smallest (minimum) value from a list of strings.
Syntax
s = MIN$(s1 [, s2 [, s3 ... [, s...]]])
Returns
String
Parameters
Name |
Type |
Optional |
Meaning |
s1 |
String |
No |
The first string |
s2, ... |
String |
Yes |
Any successive string |
Remarks
Restrictions
MIN$ is case sensitive
See also
Examples
Thanks to Abraxas for the following script example
' Usage of the MAX$ Keyword example
' Usage of the MIN$ Keyword example
' Attention: MIN$ and MAX$ are case sensitive!
Dim MyNo1String As String VALUE "What" ' ascii values 87 104 97 116
Dim MyNo2String As String VALUE "is" ' ascii values 105 115
Dim MyNo3String As String VALUE "the" ' ascii values 116 104 101
Dim MyNo4String As String VALUE "Value" ' ascii values 86 97 108 117 101
Dim sMsg As String
sMsg += "String 1 " & MyNo1String & $CRLF
sMsg += "String 2 " & MyNo2String & $CRLF
sMsg += "String 3 " & MyNo3String & $CRLF
sMsg += "String 4 " & MyNo4String & $CRLF & $CRLF
smsg += "MAX$ " & MAX$(MyNo1String, MyNo2String, MyNo3String, MyNo4String) & $CRLF
smsg += "MIN$ " & MIN$(MyNo1String, MyNo2String, MyNo3String, MyNo4String) & $CRLF
MSGBOX 0, sMsg