ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / HFSQL / HFSQL functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
HCompareItem (Function)
In french: HCompareRubrique
Compares two values by sorting them according to the specified HFSQL index sort item: all sort options specified for the sort item are taken into account (case sensitivity, punctuation, sort direction, Unicode language, etc.).
Example
SWITCH HCompareItem(Client, Nom, sNom1, sNom2)
	CASE 0
		Info("Les deux valeurs sont identiques.")
	CASE 1
		Info("Nom1 est plus grand.")
	CASE -1
		Info("Nom2 est plus grand.")
END
HCompareItem(MonFichierTest, RubSensibleCasseCroissant, "A", "B")
// Renvoie -1 (comme ChaîneCompare)
HCompareItem(MonFichierTest, RubNonSensibleCasseCroissant, "A", "B")
// Renvoie +1 (contrairement à ChaîneCompare)
Syntax
<Result> = HCompareItem(<Data file> , <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.
<Data file>: Character string
Name of the HFSQL data file containing the index that describes the sort.
<Sort item>: Character string
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: wd300hf.dll
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help