CVShort

Converts a two-byte string to a KeyPgShortShort integer variable

Syntax
	KeyPgDeclareDeclare KeyPgFunctionFunction CVShort ( KeyPgByrefByRef str KeyPgAsAs KeyPgConstQualifierConst KeyPgStringString ) KeyPgAsAs KeyPgShortShort

Usage
	result = CVShort( str )

Parameters
	str
		A KeyPgStringString at least two bytes in length with a binary copy of a KeyPgShortShort 
		integer variable stored in it.

Return Value
	 KeyPgShortShort variable holding the binary copy of a KeyPgShortKeypgshort.

Description
	Returns a 16-bit KeyPgShortShort integer value using the binary data contained in 
	a KeyPgStringString of at least two bytes in length.  A value of zero (0) is 
	returned if the string is less than two bytes in length.

	CVShort is used to convert 2-byte strings created with KeyPgMkshortMKShort.

	This function can also be used to convert 16-bit integer values from a 
	memory or file buffer without the need for a KeyPgType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 String
	s = "AB"
	si = CVShort(s)
	Print Using "s = ""&"""; s
	Print Using "si = _&H&"; Hex(si)

Dialect Differences
	* Not available in the CompilerOptlang-lang qb dialect unless referenced with the 
	  alias __Cvshort.

Differences from QB
	* In QB this function is called CVI

See also
	* KeyPgMkshortMKShort
	* KeyPgCviCVI
	* KeyPgCvlCVL
	* KeyPgCvlongintCVLongInt

