Files
BlitzNext/_release/help/commands/2d_commands/PeekShort.htm
T
2014-02-26 16:08:39 +13:00

23 lines
1.9 KiB
HTML

<html><head><title>Command: PeekShort </title><meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'><link rel='stylesheet' href='../css/commands.css' type='text/css'></head><body><span class='Command'>&nbsp;&nbsp;PeekShort bank,offset&nbsp;&nbsp;</span></p><span class='header'>Definition:</span> <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>Reads a short value from a memory bank.</td></tr></table><span class='header'><br>Parameter Description:</span> <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>bank = variable containing handle to valid bank<br>
offset = offset in bytes to read the value<br>
</td></tr></table><p class='header'>Command Description: <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>This command reads a short type value from a memory bank created with the <a href='CreateBank.htm'>CreateBank</a> command. Also see <a href='PokeInt.htm'>PokeInt</a>, <a href='PokeFloat.htm'>PokeFloat</a>, <a href='PokeByte.htm'>PokeByte</a>, and <a href='PokeShort.htm'>PokeShort</a>. To retrieve from a memory bank, use <a href='PeekInt.htm'>PeekInt</a>, <a href='PeekFloat.htm'>PeekFloat</a>, and <a href='PeekByte.htm'>PeekByte</a>.</td></tr></table><p class='header'>Example: <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>; Bank Commands Example<br>
<br>
bnkTest=CreateBank(500)<br>
<br>
For t = 1 To 50<br>
PokeByte bnkTest,t,Rnd(255)<br>
PokeInt bnkTest,t+1,Rnd(10000)<br>
PokeShort bnkTest,t+2,Rnd(10000)<br>
PokeFloat bnkTest,t+3,Rnd(-.999,.999)<br>
Next<br>
<br>
For t = 1 To 50<br>
Print PeekByte (bnkTest,t)<br>
Print PeekInt (bnkTest,t+1)<br>
Print PeekShort (bnkTest,t+2)<br>
Print PeekFloat (bnkTest,t+3)<br>
Next<br>
<br>
Freebank bnkTest<br></td></tr></table><p><b><a target="_top" href="../index.htm">Index</a></b></p></body>
</html>