PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • The different syntaxes depending on the values to convert
  • Using HConvertX (method kept for backward compatibility with WINDEV 5.5)
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
HConvertX (Function)
In French: HConvertX
HFSQLHFSQL Client/ServerAvailable only with these kinds of connection
Converts a numeric value into a binary string in order to perform a search on a numeric key. Used to build a composite key that includes one or more numeric items.
For the data files that use the "Mode 7" for managing space characters in the text items, HBuildKeyValue must be used to perform browse operations on the composite keys. See Composite keys for more details.
Warning
These functions are kept for backward compatibility to migrate the applications developed in WINDEV 5.5 and WEBDEV 1.5.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Example
// CompKey is made of PRODREF (text) and QTY (integer)
// EDT_Quantity and EDT_ProductRef are two edit controls
Srch is string
HConvertE(Search, EDT_Quantity)
Srch = Complete(EDT_ProductRef, 8) + Srch
HReadSeek(Orders, CompKey, Srch)
Syntax
<Result> = HConvertX(<Text Variable> , <Numeric Value>)
<Result>: Boolean
  • True if no problem occurred,
  • False if an error occurred. HError is used to identify the error.
<Text Variable>: Ansi Character String variable
Variable to which the conversion result will be assigned. This variable must have a sufficient size and it will be filled with space characters.
<Numeric Value>: Numeric variable or numeric value
Value to convert.
Remarks

The different syntaxes depending on the values to convert

HConvertC(<string>,<Short integer>)
HConvertD(<string>,<Double real>)
HConvertE(<string>,<Integer>)For backward compatibility with WEBDEV 1.5, this function handles integer_55 on 2 bytes.
HConvertL(<string>,<Long integer>)We recommend that you use HBuildKeyValue.
HConvertM(<string>,<Currency>)
HConvertP(<string>,<Turbo real>)For compatibility with the earlier versions, this function is identical to HConvertD.
HConvertR(<string>,<Simple real>)
HConvertU(<string>,<Unsigned integer>)For backward compatibility with the earlier versions, this function handles integer_55 on 2 bytes.
HConvertV(<string>,<Signed 1-byte integer>)
Tip: If you want to use HConvertX, we recommend that you use Convert, that is easier to handle.

Using HConvertX (method kept for backward compatibility with WINDEV 5.5)

To build the value of a composite key without using HBuildKeyValue, you must:
  • entirely fill the text components with the hMinVal constant.
  • convert the numeric components with HConvert.
Example:
MyCompositeKey = Complete(Customer.LastName, Dimension(Customer.LastName), hMinVal) + ...
Complete(Customer.FirstName, Dimension (Customer.FirstName), hMinVal)
Notes:
  • The hMinVal constant is equivalent to Charact(0).
  • The hMaxVal constant is equivalent to Charact(255).
See Composite keys and filters for more details.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230hf.dll
Linux wd230hf.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment