PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
New WINDEV, WEBDEV, WINDEV Mobile 25 feature!
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
<Source>.CompareItem (Function)
In french: <Source>.CompareRubrique
Compares two values by sorting them according to the specified HFSQL index item: all the sort options specified for the item are taken into account (sensitivity to the case, to the punctuation, sort direction, Unicode language, ...).
Example
SWITCH Customer.CompareItem(Name, sName1, sName2)
CASE 0
Info("The two values are identical.")
CASE 1
Info("Name1 is bigger.")
CASE -1
Info("Name2 is bigger.")
END
MyTestFile.CompareItem(ItmCaseSensitiveAscending, "A", "B")
// Returns -1 (like StringCompare)
MyTestFile.CompareItem(ItmCaseInsensitiveAscending, "A", "B")
// Returns +1 (unlike StringCompare)
Syntax
<Result> = <Source>.CompareItem(<Sort item> , <Value 1> , <Value 2>)
<Result>: Integer
  • 0 if the values are equal.
  • -1 if the first value is less than the second one.
  • 1 if the first value is greater than the second one.
<Source>: Type corresponding to the specified source
Name of the HFSQL data file containing the index that describes the sort.
<Sort item>: Character string (with or without quotes)
Name of the item corresponding to the sort index.
<Value 1>: Type of value
First value to compare.
<Value 2>: Type of value
Second value to compare.
Component : wd250hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment