Files
BlitzNext/_release/help/commands/2d_commands/PeekShort.htm
T

58 lines
1.4 KiB
HTML
Raw Normal View History

2014-12-08 12:43:20 +13:00
<html>
<head>
<title>Blitz3D Docs</title>
<link rel=stylesheet href=../css/commands.css type=text/css>
</head>
<body>
<h1>PeekShort(bank,offset)</h1>
<h1>Parameters</h1>
<table>
<tr>
<td>
bank - bank handle
<br />
offset - offset in bytes, that the peek operation will be started at
</td>
</tr>
</table>
<h1>Description</h1>
<table>
<tr>
<td>
Reads a short from a memory bank and returns the value.
2014-02-26 16:08:39 +13:00
<br />
2014-12-08 12:43:20 +13:00
<br />
A short takes up two bytes of a memory bank. Values can be in the range 0 to 65535.
<br>
<br>
See also: <a class=small href=PeekByte.htm>PeekByte</a>, <a class=small href=PeekInt.htm>PeekInt</a>, <a class=small href=PeekFloat.htm>PeekFloat</a>.
</td>
</tr>
</table>
<h1><a href=../2d_examples/PeekShort.bb>Example</a></h1>
<table>
<tr>
<td>
; Bank Commands Example
<br />
; ---------------------
<br />
<br />
bnkTest=CreateBank(12)
<br />
<br />
PokeByte bnkTest,0,Rand(255)
<br />
PokeShort bnkTest,1,Rand(65535)
<br />
PokeInt bnkTest,3,Rand(-2147483648,2147483647)
2014-02-26 16:08:39 +13:00
<br />
2014-12-08 12:43:20 +13:00
PokeFloat bnkTest,7,0.5
2014-02-26 16:08:39 +13:00
<br />
2014-12-08 12:43:20 +13:00
2014-02-26 16:08:39 +13:00
<br />