@Guilect
Re: GOTO...Sorry my illustration was a bit confusing.
Basic: Goto abc123
Basic: a line of code that I want to skip for now in order to see if that solves a particular bug
Basic: a line of code that I want to skip for now in order to see if that solves a particular bug
Basic: a line of code that I want to skip for now in order to see if that solves a particular bug
Basic: abc123:
Here is the minimal JS required to implement the goto effect
JS: If (1==2) {
JS: a line of code that I want to skip for now in order to see if that solves a particular bug
JS: a line of code that I want to skip for now in order to see if that solves a particular bug
JS: a line of code that I want to skip for now in order to see if that solves a particular bug
JS: }
JS code with additional endline comments which explain to another programmer how a goto is being implemented
JS: If (1==2) { // this line acts as a goto abc123
JS: a line of code that I want to skip for now in order to see if that solves a particular bug
JS: a line of code that I want to skip for now in order to see if that solves a particular bug
JS: a line of code that I want to skip for now in order to see if that solves a particular bug
JS: } // this line acts like a basic "label abc123"
I would not expect the compiler to auto-generate the end-line comments.
I dont expect the compiler to check the validity/safeness of the use to which goto is put.
Compiler must recognize that a basic statement "goto abc123" can be replaced simply by "if(1==2)" It can ignore the specifics of the label.
Compiler must recognize that a statement like "abc123:" is a label (as in VB6) and simply replace it by a "}"
My main reason for having goto's is I find it helps in bug hunting to quickly and clearly jump over blocks of code that may harbour the bug.
In JS one can use the block comment start & end structure: /* .... ... ... */
But in VB6 (AFAIK) there is no such start & end block comment facility.
Same seems to apply for BB. (I think I might include the facility in Browzic).
Second reason for using goto = it helps explain to Level 1 novices how computers really work, using near-natural language terms.
Then Level 2 novices can be allowed to confuse themselves with goto spaghetti.
Then Level 3 novices will appreciate the benefits of structured programming.
cheers, SteveOW.
PS I would be very glad to have fillEllipse, I can live with the outlining "feature".