![]() |
Forum Index : Microcontroller and PC projects : Mega65 preorder went live yesterday...
![]() ![]() |
|||||
Author | Message | ||||
scruss Regular Member ![]() Joined: 20/09/2021 Location: CanadaPosts: 91 |
That sounds like a throwback to FOCAL's group numbers, where every line was numbered 01.01, 01.02, ... 02.01, 02.02. etc., and you could run a group as a subroutine with DO 02.00. But line numbers every line do belong in the past. The Bas Full BASIC interpreter has a handy "unnum" feature for removing unnecessary line numbers. |
||||
toml_12953 Guru ![]() Joined: 13/02/2015 Location: United StatesPosts: 442 |
Make sure you get the latest version. The link on the webpage gives version 2.5 but there's a 2.6 available at http://www.moria.de/~michael/bas/bas-2.6.tar.gz Edited 2021-10-08 12:01 by toml_12953 |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
I started programming in Atari Basic on my 800XL back in the 80's - with a super fast 1.6MHz 6502 CPU and 64K of RAM. ![]() I loved line-numbers back then, and vowed I would never use a non-line-number programming language, as it was too complicated. Crikey, I don't think I would be able to do anything in Atari Basic now, being limited to the line numbers! ![]() Structured programming languages like MMBASIC are a god-send for more complicated stuff, and provided you indent the code correctly, I think they are even easier to read then line-numbered programs. Most modern IDE's for BASIC-type languages have line-numbers at the far left that are just not part of the actual code itself. PICAXE editor does, MMEDIT does, so the line-numbers are still a good idea as a reference for the line of code and where it is, but as to keeping them in the code, I think those days are probably gone. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
toml_12953 Guru ![]() Joined: 13/02/2015 Location: United StatesPosts: 442 |
![]() I loved line-numbers back then, and vowed I would never use a non-line-number programming language, as it was too complicated. Crikey, I don't think I would be able to do anything in Atari Basic now, being limited to the line numbers! ![]() Structured programming languages like MMBASIC are a god-send for more complicated stuff, and provided you indent the code correctly, I think they are even easier to read then line-numbered programs. Most modern IDE's for BASIC-type languages have line-numbers at the far left that are just not part of the actual code itself. PICAXE editor does, MMEDIT does, so the line-numbers are still a good idea as a reference for the line of code and where it is, but as to keeping them in the code, I think those days are probably gone. ![]() The ANSI/ISO standard for BASIC makes them mandatory but since BASIC is now a structured language, there's no reason to ever use them for targets of GOTO or GOSUB. Even error trapping is line number free. Instead of ON ERROR GOTO... You use a construct like this: WHEN EXCEPTION IN <code to be tested goes here> USE <code to be executed if error has occurred> END WHEN |
||||
diabolus Newbie ![]() Joined: 25/05/2020 Location: United KingdomPosts: 12 |
![]() I loved line-numbers back then, and vowed I would never use a non-line-number programming language, as it was too complicated. Crikey, I don't think I would be able to do anything in Atari Basic now, being limited to the line numbers! ![]() Structured programming languages like MMBASIC are a god-send for more complicated stuff, and provided you indent the code correctly, I think they are even easier to read then line-numbered programs. Most modern IDE's for BASIC-type languages have line-numbers at the far left that are just not part of the actual code itself. PICAXE editor does, MMEDIT does, so the line-numbers are still a good idea as a reference for the line of code and where it is, but as to keeping them in the code, I think those days are probably gone. ![]() ...you've got to try Fast Basic by DMSC on your Atari...or in an emulator.No line numbers, built-in DLI and PMG, and up to 30x as fast. |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
@ Tom_12953: Agreed. ![]() @ diabolus: I do recall a few other offerings including PASCAL for Atari, but most people - myself included - just used the built-in BASIC on the XL series and above. I agree about the speed. ATBASIC was quite slow even compared to other BASIC-like languages of the time. I do remember reading about that way back when. ![]() Still, without my old 800XL and ATBASIC of the time, I quite possibly would never have got involved in MMBASIC at all, so I am glad for the early exposure. Smoke makes things work. When the smoke gets out, it stops! |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2170 |
I agree on the GOTO debate but I don't dismiss it entirely (it is often condemned on a "snobbery" basis... a bit like the 8bit/16bit argument for stuff where it really makes no difference (been there back in the 80s and had a "bit-off" with BP [and won] for some oil-pressure sensing on a high speed engine of theirs). I almost never use GoTo and agree it's use should be avoided whenever possible, but it shouldn't be dismissed because we've got nice structures now. It is a good way of jumping out of a bit of code where a common possibility affects following related sections: One that really made sense for me was with some ESP8266 code I wrote. It is possible to get timeouts anywhere in the LAN code (because you are reliant on a foreign system responding) and if a T/O occurs, the only way to stop the subsequent bits of your program from trying to do their thing on a dead connection would be to set a flag and then you have ANOTHER test to jump around moot code, which then goes to the next bit which does the same test... and so on, just to maintain the structured program snobbery. It would be slow and convoluted - a simple GoTo TOHandler at any point avoids all that fluff and time wasting. That said, I am certain I don't have a monopoly on wise/elegant code-structure so a re-write might come at the problem a different way. So yes I *always* use structured programming... except when I don't ![]() houses are still made from bricks, wheels are still round. Just because it is old doesn't mean it is useless On the subject of BASIC speeds, it was often down to some thoughtful design and insight into how the language is used. For example the guys who wrote BBC Basic all recognised that most programs use simple integer variables a lot, for counters etc... so they had 26 integer size lumps of RAM set aside for such. Combined with the tokenization, when you used A%, B% etc., there was no look-up to find the variable, the firmware instantly went to the memory associated at CPU speed. That alone was an amazing speed boost and all because the writers/designers actually put some thought into how BASIC was used and optimized common stuff like FOR N%=1 TO 10. There were others too but this is the simplest and most drastic speed increase - possibly. . Edited 2021-10-10 00:40 by CaptainBoing |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7939 |
I'm quite happy to use GOTO <label> in some situations. It can actually be the more elegant solution sometimes, less confusing than SELECT/CASE in some instances. I'm not as happy using GOTO <line_number>. It's fun to use GOTO <line_number> when you have POKEd <line_number> to get self-modifying code. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |