Go to advanced search

by RichardRussell
Sun Jul 21, 2019 9:05 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

Try viewing the BasAlt documentation with StrongHelp (it is a StrongHelp manual). Just an idea. Is there a StrongHelp reader for Windows? I certainly don't have one. All documentation should be available in a standard format that everybody can read, and you can't get more standard than HTML or PDF ...
by RichardRussell
Sat Jul 20, 2019 5:50 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

In which Basic should the conversion tool be written and could it convert itself? Don't you need two conversion tools, one for each direction?! In all seriousness an 'integrated' BasAlt would probably need to have significantly greater functionality than Steve's existing bolt-on extensions do to su...
by RichardRussell
Sat Jul 20, 2019 4:02 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

Using strings for byte arrays is some kind of kluge Except that strings are supported by a rich set of built-in functions, such as INSTR() for searching, and there are generally no similar functions that operate on byte arrays. So from a performance and convenience standpoint strings are often a be...
by RichardRussell
Sat Jul 20, 2019 2:15 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

I would still like to see the Basalt extensions become part of BASIC V and VI. If that were ever to happen it would make the rift between the Wilson and Russell strands of BBC BASIC unbreachable, because whatever the merits of Steve's extensions, and of mine, they are fundamentally incompatible (no...
by RichardRussell
Sat Jul 20, 2019 11:55 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

The method of handling strings with a 'striing information block' (SIB) with a single byte for the length rather baked that into the code. Before I supported arbitrary (32-bit) length strings, I extended the maximum length from 255 to 65535 characters without making the SIB any bigger. The old SIB ...
by RichardRussell
Sat Jul 20, 2019 11:41 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

Why would anyone not believe it. It's a natural thing to do: There's nothing "natural" about a a maximum string length of 255 bytes, in my opinion! It's an entirely artificial limit. Or have a pointer to memory and put a null byte at the end. That's not really an option for two reasons. Firstly it'...
by RichardRussell
Sat Jul 20, 2019 9:18 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

I wouldn't use a BASIC that had a 64KB string length limitation. Early versions of BBC BASIC, including ARM BASIC VI which is the latest and 'best' from the Acorn stable, have a maximum string length of 255 bytes!! Can you believe it? And whilst there are various workarounds, such as using 'indirec...
by RichardRussell
Fri Jul 19, 2019 11:00 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

Richard and I have also exchanged ideas on very long strings, each producing a library for our own versions. My huge string library was never very satisfactory, and I eventually abandoned it in favour of natively supporting arbitrary-length strings (limited only by available memory) in version 6 of...
by RichardRussell
Fri Jul 19, 2019 5:13 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

2) Matrix Brandy is actually closer to BASIC VI than BASIC V !! My head is beginning to hurt, but what happens when you attempt assign the result to an integer variable: a% = -2147483647 - 2147483647 I presume that BASIC VI still sets a% to 2 in this case (if not it's less compatible with BASIC V t...
by RichardRussell
Fri Jul 19, 2019 4:31 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

Acorn BASICs all return -4294967294, only the older Brandy BASIC (and earlier unfixed Matrix Brandy) returned 2. When you say "all" which versions do you mean precisely? My genuine BBC Master, running BASIC 4 ("(C)1984 Acorn") returns 2 , BeebEm emulating BASIC 2 ("(C)1982 Acorn") returns 2 and Red...
by RichardRussell
Fri Jul 19, 2019 4:18 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

did Acorn's Basics default to single or double precision floating point? Did you miss this comment in which I enquired whether your test for precision in the classic BASIC Fibo might be confused because BBC BASIC uses neither 32-bit ('single') nor 64-bit ('double') precision but 40-bits? It's a nic...
by RichardRussell
Fri Jul 19, 2019 4:12 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

No, it toggles two different code paths, one is the (corrected) original one that pulls the float from the stack, runs TOINT() (which floor()s the number, then casts it to a signed 32-bit integer) on it and pushes it to the stack as an int. The new one pulls the float from the stack, runs floor() o...
by RichardRussell
Fri Jul 19, 2019 1:43 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

I've been having more thoughts about this. And, while it deviates from RISC OS (and BBC Micro) BBC BASIC, I've added a run-time switch to Matrix Brandy to enable this behaviour of allowing INT() to process a number that can't be stored in a standard 32-bit integer variable. Thanks. Naturally I thin...
by RichardRussell
Fri Jul 19, 2019 8:46 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

ScriptBasic takes it another level with name spaces. Brandy BASIC has that functionality (or at least is documented to have, I've never tried it) using the LIBRARY LOCAL statement. But it's the only version of BBC BASIC that does, so it's rather an outlier in that respect and if you use the feature...
by RichardRussell
Thu Jul 18, 2019 10:53 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

I am guessing that you have a different meaning of private variables than me I use the PRIVATE keyword to signify what in C would be called 'static' (I felt that STATIC was too obscure a term for a beginner). Both LOCAL and PRIVATE variables are 'local' to the FN/PROC in which they are declared, bu...
by RichardRussell
Thu Jul 18, 2019 6:45 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

Wow Richard! That is an amazing simulation. I can't take much credit for it, the shader code was originally written by somebody else and tweaked by me. But it illustrates that when you can take advantage of the GPU to do the graphics 'heavy lifting' you don't need high performance from the controll...
by RichardRussell
Thu Jul 18, 2019 4:38 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

The only of those features we are missing is structures, and we can fake that using indirection. All the features I listed are "missing" from ARM BASIC, otherwise I wouldn't have had to add them, would I?! And indirection is no substitute for structures (it's the best workaround available, but not ...
by RichardRussell
Wed Jul 17, 2019 7:23 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

If I decide to start a BBC BASIC to BBC BASIC Performance Comparison how many will contrbute for the 4 versions of BBC BASIC? My versions of BBC BASIC have never been particularly fast. I have concentrated on expanding the capabilities of the language, with speed a lower priority. Recently my effor...
by RichardRussell
Wed Jul 17, 2019 7:04 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

In that case I am surprised that a computer powerful enough to run a modern windows is that slow (about 5 times faster than a RPi 1B+ in this case) Sophie put a lot of effort into optimising the NEXT statement, and that was made easier as a result of there being only two numeric variable types that...
by RichardRussell
Wed Jul 17, 2019 5:50 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

Really? Run the statement PRINT ~x% where x% contains a value having the high bit set (will display an unsigned hexadecimal value). Hexadecimal is neither signed nor unsigned. It is simply a convenient representation of a binary number (a sequence of zeroes and ones) in a shorter, more readable for...
by RichardRussell
Wed Jul 17, 2019 5:06 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

From the manuals, and some programs that use Integer variables as unsigned. Can you quote the relevant section of the manual or list one such program? The type itself is neither signed or unsigned, it is how it is operated on that makes the difference. Nope, not true. Integer variables in BBC BASIC...
by RichardRussell
Wed Jul 17, 2019 4:46 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

In my opinion, the inconvenience of changing the meaning of LOG between Basic versions likely outweighed the advantages. I don't know how old you are, but if you are as old as me you could have argued the point in 1981! It's evident that on the balance of the evidence and advice the BBC received th...
by RichardRussell
Wed Jul 17, 2019 4:36 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

By the documentation vara, varb, varc should be integer type variables. What documentation? BBC BASIC is an explicitly-typed language; the only way the interpreter knows the type of a variable is by its suffix character(s). In my versions there are more types than there are in Acorn's: No suffix: v...
by RichardRussell
Wed Jul 17, 2019 4:06 pm
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

While it is true that a floating point value can hold a integral value greater than 2^32-1, that is still being stored as a floating point value. You seem to like to concentrate on implementation detail, when that shouldn't matter to the programmer. Regardless of how it's stored, it's an integer! B...
by RichardRussell
Wed Jul 17, 2019 8:50 am
Forum: Other programming languages
Topic: Introduction to BBC BASIC
Replies: 551
Views: 35779

Re: Introduction to BBC BASIC

if it supports up to 53-bit integers (as ARM BASIC 6 and Brandy do) Unless I'm doing something wrong, they don't. You are trying to load the number into an integer-type variable a% . Obviously that is going to fail, because integer variables can hold only 32-bit integers. But ordinary (non % suffix...

Go to advanced search