PDA

View Full Version : String = Version



NewsArchive
08-31-2012, 03:35 AM
About the two function:

String Less, String Less Than or Equal—The string value of the variable
must be greater than or equal to the value given in the Value field.


Version Less Than, Version Less Than or Equal—The version of variable
must be less than or equal the value given in the Value field.


How can I tell if a compiler variable is a string or a version?

Dirk Büchel

NewsArchive
08-31-2012, 03:36 AM
Dirk,

>
> How can I tell if a compiler variable is a string or a version?
>

It depends on what you have to do. A typical "version" has the following
form in Windows:

aaaaaa.bbbbbb.cccccc.dddddd

So if you have to compare a version then use the version comparison. If you
have to compare two strings then use the string comparison.

For Example:

VAL1 = 10.1.2.0
VAL2 = 9.0.0.0

If you do a "version" comparison, then VAL1 is larger than VAL2 (because
major version "10" is larger than major version "9").

But if you do a "string" comparison then VAL2 is larger than VAL1 (because
"9" comes before "1").

Friedrich

NewsArchive
08-31-2012, 04:37 AM
Ok -
I solved the problem as follows:

#ifcompvar [Zahl] Contains Any Letters In "A B C D E F G H I J K L M N O
P Q R S T U V W X Y Z" Then
#msgbox
#end

Dirk Büchel