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

21 lines
1.6 KiB
HTML

<html><head><title>Command: BankSize </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;BankSize (bankhandle)&nbsp;&nbsp;</span></p><span class='header'>Definition:</span> <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>Returns the size of a 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>bankhandle=handle assigned to the bank when created.</td></tr></table><p class='header'>Command Description: <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>Use this command to determing the size of an existing bank. See <a href='CreateBank.htm'>CreateBank</a>, <a href='ResizeBank.htm'>ResizeBank</a>, and <a href='CopyBank.htm'>CopyBank</a>.</td></tr></table><p class='header'>Example: <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>; BankSize, ResizeBank, CopyBank Example<br>
<br>
; create a bank<br>
bnkTest=CreateBank(5000)<br>
<br>
; Fill it with rand Integers<br>
For t = 0 To 4999<br>
PokeByte bnkTest,t,Rand(9)<br>
Next<br>
<br>
; Resize the bank<br>
ResizeBank bnkTest,10000<br>
<br>
; Copy the first half of the bank to the second half<br>
CopyBank bnkTest,0,bnkTest,5000,5000 <br>
<br>
; Print final banksize<br>
Print BankSize(bnkTest)<br>
</td></tr></table><p><b><a target="_top" href="../index.htm">Index</a></b></p></body>
</html>