PeekFloat.htm 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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>PeekFloat(bank,offset)</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. bank - bank handle <br />
  13. offset - offset in bytes, that the peek operation will be started at
  14. </td>
  15. </tr>
  16. </table>
  17. <h1>Description</h1>
  18. <table>
  19. <tr>
  20. <td>
  21. Reads a float from a memory bank and returns the value. <br />
  22. <br />
  23. A float takes up four bytes of a memory bank.
  24. <br>
  25. <br>
  26. See also: <a class=small href=PeekByte.htm>PeekByte</a>, <a class=small href=PeekShort.htm>PeekShort</a>, <a class=small href=PeekInt.htm>PeekInt</a>.
  27. </td>
  28. </tr>
  29. </table>
  30. <h1><a href=../2d_examples/PeekFloat.bb>Example</a></h1>
  31. <table>
  32. <tr>
  33. <td>
  34. ; Bank Commands Example <br />
  35. ; --------------------- <br />
  36. <br />
  37. bnkTest=CreateBank(12) <br />
  38. <br />
  39. PokeByte bnkTest,0,Rand(255) <br />
  40. PokeShort bnkTest,1,Rand(65535) <br />
  41. PokeInt bnkTest,3,Rand(-2147483648,2147483647) <br />
  42. PokeFloat bnkTest,7,0.5 <br />
  43. <br />
  44. Print PeekByte(bnkTest,0) <br />
  45. Print PeekShort(bnkTest,1) <br />
  46. Print PeekInt(bnkTest,3) <br />
  47. Print PeekFloat(bnkTest,7) <br />
  48. <br />
  49. FreeBank bnkTest
  50. </td>
  51. </tr>
  52. </table>
  53. <br>
  54. <a target=_top href=../index.htm>Index</a><br>
  55. <br>
  56. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=PeekFloat&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  57. </html>