PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

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
HCompareItem (Function)
In French: HCompareRubrique
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, ...).
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 22 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
WINDEVJava This function is now available for the Java applications.
New in version 22
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
WINDEVJava This function is now available for the Java applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
WINDEVJava This function is now available for the Java applications.
Example
SWITCH HCompareItem(Customer, Name, sName1, sName2)
CASE 0
Info("The two values are identical.")
CASE 1
Info("Name1 is bigger.")
CASE -1
Info("Name2 is bigger.")
END
HCompareItem(MyTestFile, ItmCaseSensitiveAscending, "A", "B")
// Returns -1 (like StringCompare)
HCompareItem(MyTestFile, ItmCaseInsensitiveAscending, "A", "B")
// Returns +1 (unlike StringCompare)
Syntax
<Result> = HCompareItem(<File Name> , <Name of 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.
<File Name>: Character string (with or without quotes)
Name of the HFSQL data file containing the index that describes the sort.
<Name of Sort Item>: Character string (with or without quotes)
Name of the item corresponding to the sort index.
<Value 1>: Type of the value
First value to compare.
<Value 2>: Type of the value
Second value to compare.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230hf.dll
Windows Mobile wp230hf.dll
Java wd230java.jar
Linux wd230hf.so
Android wd230android.jar
Minimum required version
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment