Revision [12256]

This is an old revision of KeyPgCvi made by JeffMarshall on 2008-01-18 14:09:09.

 

CVI


Converts an four byte string to an integer variable

Syntax:
Usage:
result = Cvi( str )

Parameters:
str
A KeyPgString string exactly four bytes in length with a binary copy of an integer variable stored in it.

Return Value:
An KeyPgInteger integer variable to copy the binary copy of a integer to.

Description:
Returns a 32 bit KeyPgInteger Integer value using the binary data contained in a string that is exactly four bytes in length. An integer value of zero (0) is returned if the string is not exactly four bytes in length.
Cvi is used to convert 4-byte-strings created with KeyPgMki Mki.
This function can also be used to convert 32 bit integer values from a memory or file buffer without the need for a KeyPgType structure. However, just as with the type structure, special care should be taken when using Cvi to convert strings that have been read from a buffer. The KeyPgCvi Cvi and KeyPgMki Mki functions are processor dependent. That is, they will return different results depending on the endianness of the processor.

Examples:
Dim a As Integer, b As String
a=4534
b=MKI(a)
Print a, CVI(b)
Sleep


Dialect Differences:
Differences from QB:
See also:
Back to String Functions
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode