BankSize.htm 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>BankSize (bankhandle)</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. bankhandle - handle assigned to the bank when created.
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. Use this command to determine the size of an existing bank.
  21. <br>
  22. <br>
  23. See also: <a class=small href=CreateBank.htm>CreateBank</a>, <a class=small href=ResizeBank.htm>ResizeBank</a>, <a class=small href=CopyBank.htm>CopyBank</a>.
  24. </td>
  25. </tr>
  26. </table>
  27. <h1><a href=../2d_examples/BankSize.bb>Example</a></h1>
  28. <table>
  29. <tr>
  30. <td>
  31. ; BankSize, ResizeBank, CopyBank Example <br />
  32. <br />
  33. ; create a bank <br />
  34. bnkTest=CreateBank(5000) <br />
  35. <br />
  36. ; Fill it with rand Integers <br />
  37. For t = 0 To 4999 <br />
  38. PokeByte bnkTest,t,Rand(9) <br />
  39. Next <br />
  40. <br />
  41. ; Resize the bank <br />
  42. ResizeBank bnkTest,10000 <br />
  43. <br />
  44. ; Copy the first half of the bank to the second half <br />
  45. CopyBank bnkTest,0,bnkTest,5000,5000 <br />
  46. <br />
  47. ; Print final banksize <br />
  48. Print BankSize(bnkTest)
  49. </td>
  50. </tr>
  51. </table>
  52. <br>
  53. <a target=_top href=../index.htm>Index</a><br>
  54. <br>
  55. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=BankSize&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  56. </html>