|
100 overlooked features of BASIC |
|
monkeyson2 (23:50 8/7/2004) mavhc (23:58 8/7/2004) martin (22:51 20/7/2004) monkeyson2 (00:00 21/7/2004) adrianl (01:55 21/7/2004) cterran (02:35 21/7/2004) adrianl (02:51 21/7/2004) cterran (03:21 21/7/2004) mavhc (10:18 21/7/2004) adrianl (10:54 21/7/2004) monkeyson2 (11:02 21/7/2004) adrianl (12:18 21/7/2004) mavhc (12:42 21/7/2004)
|
|
Phil Mellor |
Message #56795, posted by monkeyson2 at 23:50, 8/7/2004 |
Please don't let them make me be a monkey butler
Posts: 12380
|
1. Matrix multiplication. |
|
[ Log in to reply ] |
|
Mark Scholes |
Message #56797, posted by mavhc at 23:58, 8/7/2004, in reply to message #56795 |
Member
Posts: 660
|
1. Matrix multiplication. Agent Smith didn't overlook that.
2. Local DIMs |
|
[ Log in to reply ] |
|
martin hansen |
Message #57213, posted by martin at 22:51, 20/7/2004, in reply to message #56797 |
Member
Posts: 17
|
2. Local DIMs Don't you call me DIM.
3. SWAP
[Edited by martin at 23:51, 20/7/2004] |
|
[ Log in to reply ] |
|
Phil Mellor |
Message #57215, posted by monkeyson2 at 00:00, 21/7/2004, in reply to message #57213 |
Please don't let them make me be a monkey butler
Posts: 12380
|
4. LISTO
(This is going to take a while, isn't it?)
[Edited by monkeyson2 at 01:01, 21/7/2004] |
|
[ Log in to reply ] |
|
Adrian Lees |
Message #57220, posted by adrianl at 01:55, 21/7/2004, in reply to message #57215 |
Member
Posts: 1637
|
4. LISTO (This is going to take a while, isn't it?) Even longer when entries have to be disqualified! LISTO doesn't exist in BASIC V, though I'm not sure about versions from the Master. There was a very handy patch that provided this command for BASIC 2 on the Elk/BBC. AFAIK it was never part of BASIC itself |
|
[ Log in to reply ] |
|
Chris |
Message #57222, posted by cterran at 02:35, 21/7/2004, in reply to message #57220 |
Member
Posts: 163
|
LISTO doesn't exist in BASIC V, Ahem:
03:31:57[ADFS::HardDisc4.$.Internet.MailNews.Bogofilter]*BASIC ARM BBC BASIC V version 1.35 (C) Acorn 1989
Starting with 2093308 bytes free
>HELP LISTO This command lists the program: LIST [<line number>][,[<line number>]][IF<pattern>]. list section [if pattern] LISTO <option number>. Bits mean:- 0: space before line 1: indent structure 2: split lines at : 3: don't list line number 4: list tokens in lower case > |
|
[ Log in to reply ] |
|
Adrian Lees |
Message #57223, posted by adrianl at 02:51, 21/7/2004, in reply to message #57222 |
Member
Posts: 1637
|
*sheepish grin* OK, that's what I get for making assumptions.... the LISTO I once knew was a patch that allowed you to type LISTO fred and it would list all program lines that contained the string 'fred'.... very useful for finding procedures, variable usage etc if you had only the BASIC interpreter itself for editing programs. |
|
[ Log in to reply ] |
|
Chris |
Message #57224, posted by cterran at 03:21, 21/7/2004, in reply to message #57223 |
Member
Posts: 163
|
Sounds like LIST IF. Which itself probably deserves to be:
5. LIST IF
I think LISTO has been in ever since the first Archimedes machines. LIST IF came later.
Another couple:
6. Dot products (amazingly useful for processing colour vectors). But it perhaps comes under 1 on this list.
7. RETURN parameters. Who needs globals?
8. LIBRARY and OVERLAY (less important now with loadsaram, but was very handy in the olden days)
9. Array/vector parameters |
|
[ Log in to reply ] |
|
Mark Scholes |
Message #57232, posted by mavhc at 10:18, 21/7/2004, in reply to message #57224 |
Member
Posts: 660
|
Sounds like LIST IF. Which itself probably deserves to be:
5. LIST IF
I think LISTO has been in ever since the first Archimedes machines. LIST IF came later.
Since at least BASIC II if not I, BBC B days |
|
[ Log in to reply ] |
|
Adrian Lees |
Message #57238, posted by adrianl at 10:54, 21/7/2004, in reply to message #57232 |
Member
Posts: 1637
|
Yeah, and the patch I'm thinking of was probably called LISTIF rather than LISTO as well.... makes sense. Anyway, I'll shut up now! |
|
[ Log in to reply ] |
|
Phil Mellor |
Message #57239, posted by monkeyson2 at 11:02, 21/7/2004, in reply to message #57238 |
Please don't let them make me be a monkey butler
Posts: 12380
|
I remember there being a program in Electron User that gave some fancy LISTO features. Don't know if it added to LISTO or invented it though.
And I'm sure even if there was LISTO on the beeb it didn't do indentation and stuff, just spaces after line numbers. |
|
[ Log in to reply ] |
|
Adrian Lees |
Message #57248, posted by adrianl at 12:18, 21/7/2004, in reply to message #57239 |
Member
Posts: 1637
|
I remember there being a program in Electron User that gave some fancy LISTO features. Don't know if it added to LISTO or invented it though. I used to get Electron User, so perhaps it was called LISTO rather than LISTIF? Doesn't matter.
And I'm sure even if there was LISTO on the beeb it didn't do indentation and stuff, just spaces after line numbers. Your memory/knowledge is better than mine, then. I just had to check that with BeebIt. I pretty much gave up on BBC BASIC when I took over HDC (written in C) from BEEBUG. I still use it all the time for prototyping code and checking the behaviour of SWIs and ARM instructions, though. |
|
[ Log in to reply ] |
|
Mark Scholes |
Message #57253, posted by mavhc at 12:42, 21/7/2004, in reply to message #57239 |
Member
Posts: 660
|
I remember there being a program in Electron User that gave some fancy LISTO features. Don't know if it added to LISTO or invented it though.
And I'm sure even if there was LISTO on the beeb it didn't do indentation and stuff, just spaces after line numbers. Nope, it did indentation.
"BASIC IV Also known as CMOS BASIC, this version was a major development from BASIC III. It was designed for use on the BBC Master series and 65C12 Second Processors. Both these used a slightly more powerful version of the 6502 processor than the one used in the original BBC. This allowed several major enhancements to be squeezed into the ROM, such as LIST IF, EXT# as a statement, EDIT, TIME$, ON ... PROC, | in VDU statements and faster floating point. Some bugs were also corrected"
"BASIC IV improvements LISTO bits 1 and 2 (which cause loops to be indented) now work correctly, inasmuch as the NEXT lines up with its FOR and UNTIL with its REPEAT. If LISTO is non-zero, leading spaces are stripped from input lines (i.e. between the line-number and first statement). Trailing spaces are always stripped"
BASIC V added: 3 The line number is not listed. An error is displayed at line number references 4 Keywords are listed in lower case
and maybe
2 Lines are split at the : statement delimiter |
|
[ Log in to reply ] |
|
|