Cvw Function

Purpose

Converts two characters in a string to a 16 bit integer (word).

Syntax

word = Cvw(a$ [,offset% = 1])

Description

Cvw takes four characters starting at offset in a string as a number. Cvw(a$) is equivalent to DPeek(V:a$). Cvw returns 0 if the string length is less than two.

Example

OpenW 1

Print Cvw("Hello GFA")    // Prints 25928

Print Cvw("Hello GFA, 3") // Prints 25928

Remarks

Cvw() is the reverse function of Mkw$(). Cvw() is the same as Cv2().

See Also

Asc(), Cvi(), Cvs(), Cvd(), Chr$(), Mki$(), Mkl$(), Mks$(), Mkd$()

{Created by Sjouke Hamstra; Last updated: 27/09/2014 by James Gaite}