BBC BASIC for Windows
« Memory Management »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:50pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Memory Management  (Read 665 times)
Kirkkaf13
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 28
xx Re: Memory Management
« Reply #2 on: Apr 26th, 2015, 3:48pm »

Hello Richard,

Thank you for providing the example.

I have a few further questions;

How did you know the value of PI would return 10 bytes? I thought floating point numbers in BBC BASIC was 32bit/4bytes (using V5)?

How can I see the binary representation of PI to understand how floating point numbers look in binary?

Thank you,

Kirk
« Last Edit: Apr 26th, 2015, 3:55pm by Kirkkaf13 » User IP Logged

rtr2
Guest
xx Re: Memory Management
« Reply #3 on: Apr 26th, 2015, 4:52pm »

on Apr 26th, 2015, 3:48pm, Kirkkaf13 wrote:
How did you know the value of PI would return 10 bytes? I thought floating point numbers in BBC BASIC was 32bit/4bytes (using V5)?

Native floating-point numbers in BBC BASIC are never 4 bytes (not even in the original 6502 version); you must be thinking about a different dialect of BASIC. In BBC BASIC they are either 5, 8 or 10 bytes. In this case I was using v6.00a, so variant numeric variables are 10 bytes (unless I state otherwise, you should assume that I am using the latest version).

Quote:
How can I see the binary representation of PI to understand how floating point numbers look in binary?

It's documented in the BB4W help manual, under 'Format of Data in Memory... Variable storage in memory', or you can read it online here.

Richard.
« Last Edit: Apr 26th, 2015, 5:03pm by rtr2 » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls