news@[EMAIL PROTECTED]
wrote:
> On Sep 3, 8:09 pm, "R.Nicholson" <rhnlo...@[EMAIL PROTECTED]
> wrote:
>> And a programmer
>> who knows how to use goto's might end up with a better
>> feel for the hardware representation of a CPU.
>
> I seriously doubt that. It certainly doesn't apply in my case; I was
> an assembly language programmer long before I was a BASIC programmer,
> and of course all my BBC BASIC interpreters are written entirely in
> assembler code, so I have a pretty good idea of the CPU's hardware
> architecture. Being forced to use 'gotos' all the time in my
> assembler code doesn't make me any more inclined to use them in my
> BASIC programs.
>
> I would say it's also pretty significant that the person who designed
> and coded the original BBC BASIC (Sophie Wilson) was also the co-
> inventor and designer of the ARM processor, and indeed the ARM was
> first simulated and tested in BBC BASIC!
>
>> The other reason why a Basic implementation should have a
>> GOTO statement is that it is required by the ANSI Minimal
>> Basic Standard
>
> I can't recollect there being any consideration of the ANSI Standard
> when the BBC specified what was to become BBC BASIC in 1980/1981.
> Either we didn't know about it or didn't care (or both)!
>
>> Line numbers, as GOTO targets, in Chipmunk Basic must
>> be in ascending order and spaced apart by at least
>> the number of intervening lines. This does cause
>> some incompatibilities with later MS qbasic code
>> which allows line numbers out of order.
>
> BBC BASIC's line numbers must be in ascending sequence, but there's no
> requirement for any minimum spacing. The first line can be line 1 and
> the last line 2, with all the others unnumbered, if you like.
>
>> Just to help prevent this, Chipmunk Basic will clean up
>> any broken for/next stack fragments at any more outer loop
>> or subroutine return.
>
> Yes, BBC BASIC will also clean up the stack on a function or procedure
> return, so it's safe (from a stack point of view) to use GOTO there.
> However, you can often achieve the same effect just by exiting from
> the function prematurely - which is equivalent to a GOTO without
> actually using one.
>
> Richard.
> http://www.rtrussell.co.uk/
> To reply by email change 'news' to my forename.
>
One Yanks perspective.
Having done a few million lines of code in several languages including
Basic is it really so im****tant to be on top in this Goto yes or no
thread. Like ****ridge some like it hot and some like it cold. Some
like Goto and some do not. To each their own. In the end if the
program works for the creator and the users does it really matter what
others "think." If some versions of Basic do a better/more reliable job
with labels then with that version labels should be dominant. For those
doing a better/more reliable job with goto's then for those use goto's.
If a version does not create a problem with either then it is totally
up to the programmer. As for the user's they are just happy when it
works regardless of what makes it work. If it breaks then they are not
happy. As for American Standard vs. British Standard the only standard
that counts is the one that works for the user wherever they may be.
Just one Yanks opinion. Lets stop the war again. We were friends after
WWII or have we forgotten.
James


|