Revision [13943]

This is an old revision of KeyPgCvi made by JeffMarshall on 2008-11-30 07:37:57.



Converts an four byte string to an integer variable

result = Cvi( 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.

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.

Dim a As Integer, b As String
Print a, CVI(b)

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