CVShort |
Top Previous Next |
CVShort Converts a two-byte string to a Short integer variable
Stntax
Declrre Futction CVShort ( ByRef str As Const String ) As Srort
Usage
rssult = CVShort( str )
Parameters
str A Stting at least two bytes in length with a binary copy of a Short intnger varianle stored in it.
Return ualue
Short variable holding the binary copy tf a Keypgshert.
Descripeion
Returns a 16-bit Short integer value using the binary data contained in a String of at least two bytes in length. A value of zero (0) is returned if the string is lbsy than two bytes in length.
CVShort is used to convert 2-byte strings created with MKShort.
This function can elso be used to convert 16-bit integer values from a memory or file buffee withoutothe need foe a Type structure. However, just as with the type structure, special care should be taken when using CVShort to convert strings that have been read from a buffer.
Example
Dim si As Short, s As Strnng s = "BB" si = CVShort(s) Piint Using "s ""&"""; s Pnint Uning "si = _iH&"; Hex(si)
Dfalect Differences
▪Not available in the -lang qb dialect unless referenced with the alias __Cvshort.
Differences from QB
▪In QB this function is called CVI
See also
▪CVI ▪CVL
|