Revision history for KeyPgCvshort


Revision [22000]

Last edited on 2017-11-21 01:11:01 by JeffMarshall [fix page link name case]
Additions:
Converts a two-byte string to a ##[[KeyPgShort|Short]]## integer variable
Deletions:
Converts a two-byte string to a ##[[KeypgShort|Short]]## integer variable


Revision [20877]

Edited on 2016-03-12 16:18:24 by fxm [Formatting]
Additions:



Revision [20124]

Edited on 2016-02-10 15:56:36 by DkLwikki [Update link format]
Additions:
Converts a two-byte string to a ##[[KeypgShort|Short]]## integer variable
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Cvshort** ( [[KeyPgByref|byref]] //str// [[KeyPgAs|as]] [[KeyPgConstQualifier|const]] [[KeyPgString|string]] ) [[KeyPgAs|as]] [[KeyPgShort|Short]]
A ##[[KeyPgString|String]]## at least two bytes in length with a binary copy of a ##[[KeyPgShort|Short]]## integer variable stored in it.
##[[KeyPgShort|Short]]## variable holding the binary copy of a ##[[KeyPgShort|KeyPgShort]]##.
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.
- Not available in the //[[CompilerOptlang|-lang qb]]// dialect unless referenced with the alias ##**""__Cvshort""**##.
- ##[[KeyPgMkshort|Mkshort]]##
- ##[[KeyPgCvi|Cvi]]##
- ##[[KeyPgCvl|Cvl]]##
- ##[[KeyPgCvlongint|Cvlongint]]##
Deletions:
Converts a two-byte string to a ##[[KeypgShort Short]]## integer variable
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cvshort** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgShort Short]]
A ##[[KeyPgString String]]## at least two bytes in length with a binary copy of a ##[[KeyPgShort Short]]## integer variable stored in it.
##[[KeyPgShort Short]]## variable holding the binary copy of a ##[[KeyPgShort KeyPgShort]]##.
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.
- Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Cvshort""**##.
- ##[[KeyPgMkshort Mkshort]]##
- ##[[KeyPgCvi Cvi]]##
- ##[[KeyPgCvl Cvl]]##
- ##[[KeyPgCvlongint Cvlongint]]##


Revision [16831]

Edited on 2013-06-14 04:22:08 by CountingPine [Fix probable pasting errors]
Additions:
##[[KeyPgShort Short]]## variable holding the binary copy of a ##[[KeyPgShort KeyPgShort]]##.
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.
Deletions:
An ##[[KeyPgShort Short]]## variable holding the binary copy of a ##[[KeyPgShort KeyPgShort]]##.
Returns a 16-bit ##[[KeyPgInteger 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.


Revision [16829]

Edited on 2013-06-14 04:07:23 by CountingPine [Smartphone edits bad idea: fix typo, remove linebreaks apparently addedby Opera Mini]
Additions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cvshort** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgShort Short]]
A ##[[KeyPgString String]]## at least two bytes in length with a binary copy of a ##[[KeyPgShort Short]]## integer variable stored in it.
Returns a 16-bit ##[[KeyPgInteger 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.
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.
si = cvshort(s)
- Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Cvshort""**##.
Deletions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cvshort** ( [[KeyPgByref byref]] //str// [[KeyPgAs
as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgShort Short]]
A ##[[KeyPgString String]]## at least two bytes in length with a binary copy of a ##[[KeyPgShort
Short]]## integer variable stored in it.
Returns a 16-bit ##[[KeyPgInteger 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.
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.
si = cshort(s)
- Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias
##**""__Cvshort""**##.


Revision [16828]

Edited on 2013-06-14 04:00:18 by CountingPine [Fix example: cvi->cvshort]
Additions:
si = cshort(s)
Deletions:
si = cvi(s)


Revision [16547]

Edited on 2013-01-22 23:37:38 by CountingPine [Appropriate length string in example]
Additions:
s = "AB"
Deletions:
s = "ABCD"


Revision [16545]

Edited on 2013-01-22 23:35:49 by CountingPine [Use function in example!]
Additions:
s = "ABCD"
si = cvi(s)
Deletions:
si = &H4241
s = mkshort(si)


Revision [16536]

Edited on 2013-01-22 15:48:24 by CountingPine [More inline with CVI]
Additions:
Converts a two-byte string to a ##[[KeypgShort Short]]## integer variable
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cvshort** ( [[KeyPgByref byref]] //str// [[KeyPgAs
as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgShort Short]]
A ##[[KeyPgString String]]## at least two bytes in length with a binary copy of a ##[[KeyPgShort
Short]]## integer variable stored in it.
An ##[[KeyPgShort Short]]## variable holding the binary copy of a ##[[KeyPgShort KeyPgShort]]##.
Returns a 16-bit ##[[KeyPgInteger 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.
dim si as short, s as string
si = &H4241
s = mkshort(si)
print using "si = _&H&"; hex(si)
print using "s = ""&"""; s
- Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias
##**""__Cvshort""**##.
- In QB this function is called CVI
- ##[[KeyPgCvl Cvl]]##
- ##[[KeyPgCvlongint Cvlongint]]##
Deletions:
Converts an two byte string to a ##[[KeyPgShort Short]]## variable
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cvshort** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgShort short]]
A ##[[KeyPgString String]]## exactly two bytes in length with a binary copy of a ##[[KeyPgShort Short]]## variable stored in it.
Returns a ##[[KeyPgShort Short]]## variable to copy the binary copy of a short to.
Does a binary copy from a 2-byte-string to a ##[[KeyPgShort Short]]## variable. The result will have a sense only if the string contained a correctly formatted ##[[KeyPgShort Short]]##, as the one generated by ##[[KeyPgMkshort Mkshort]]##
This function is useful to read numeric values from buffers without using a ##[[KeyPgType Type]]## definition.
dim a as short, b as string
a=4534
b=mkshort(a)
print a, cvshort(b)
sleep
- Not available in the //[[CompilerOptlang -lang qb]]// dialect unless referenced with the alias ##**""__Cvshort""**##.
- In QBasic this function is called CVI


Revision [15836]

Edited on 2012-01-25 11:38:34 by CountingPine [SHORT Links]
Additions:
Converts an two byte string to a ##[[KeyPgShort Short]]## variable
A ##[[KeyPgString String]]## exactly two bytes in length with a binary copy of a ##[[KeyPgShort Short]]## variable stored in it.
Deletions:
Converts an two byte string to a short variable
A ##[[KeyPgString String]]## exactly two bytes in length with a binary copy of a short variable stored in it.


Revision [15835]

Edited on 2012-01-25 11:37:14 by CountingPine [Remove one of the Diff sections; link to CVI]
Additions:
- ##[[KeyPgCvi Cvi]]##
Deletions:
- New to ""FreeBASIC""


Revision [14293]

Edited on 2009-08-29 21:52:19 by CountingPine [Remove CamelCase links in "New to FreeBASIC"]
Additions:
- New to ""FreeBASIC""
Deletions:
- New to FreeBASIC


Revision [13947]

Edited on 2008-11-30 07:38:24 by JeffMarshall [name case fixup]
Additions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cvshort** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstQualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgShort short]]
Deletions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cvshort** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstqualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgShort short]]


Revision [13915]

Edited on 2008-11-28 18:54:31 by LaananFisher [Fixed: const-correctness]
Additions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cvshort** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgConstqualifier const]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgShort short]]
Deletions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Cvshort** ( [[KeyPgByref byref]] //str// [[KeyPgAs as]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgShort short]]


Revision [13112]

The oldest known version of this page was created on 2008-04-24 15:41:09 by JeffMarshall [Fixed: const-correctness]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode