CVT() Function - BBj Specific Information
For this topic's original documentation, see CVT()
Function - Pixel, Character, and Semicharacter Unit Conversion.
BBj-Specific Information
The unit conversion values returned for BBj will not necessarily be the same as the values returned for Visual PRO/5. The font used for conversion is the default control font. It may return slightly different values than Visual PRO/5.
Syntax
CVT(string,int{,ERR=lineref})
Description
In BBj 15.0 and higher, the CVT(string,int) function emulates the Thoroughbred Basic CVT function.
Parameter |
Description |
||||||||||||||||||||||||||||||||||||
string |
String to be converted. |
||||||||||||||||||||||||||||||||||||
int |
Integer identifying conversion functions, according to the following table. |
||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
ERR=lineref |
Branch to be taken if an error occurs during execution. |
A combination of operations may be specified by adding functional values. For example, CVT(A$,40) strips leading tabs and spaces and converts to upper case. CVT(A$,40) is equivalent to CVT(A$,32+8), which is equivalent to CVT(CVT(A$,8),32). When multiple operations are combined in a single CVT() function, they are guaranteed to be applied in ascending numeric order (with one exception, 8192, noted above). For example, CVT(CVT(A$,8+16384),16) first strips leading tabs and spaces, then converts non-printable characters to spaces, and finally replaces multiple spaces with a single space. To apply multiple options in a different order, execute the CVT() in a nested manner as shown in the above example.
Example
0010 LET A$=CVT(" 123",8)
0020 PRINT A$
123
See Also
CVS() Function - String Data Conversion
Functions - Alphabetical Listing