RE: Goto, part 7,347,893

new topic     » topic index » view thread      » older message » newer message

-------Phoenix-Boundary-07081998-

You wrote on 2/15/02 2:45:00 PM:

>
>I still have no pressing desire for goto, but unfortunately I am
>cursed with an inquisitive mind smile
>
>How difficult would it be to 'subscript' the loops and control
>structures with a label, eg
> while[s1subs] k <= length(s1) do
>....
> end while[s1subs]
>
>and then allow labelled controls such as
>
>next[s1subs] & exit[s1subs]
>
>((&no, i'm not asking/careing about specific syntax yet))
>
>when control structures are nested:
>
> while[s1subs] k <= length(s1) do
>     for[s1items] j = 1 to length(s1[k]) do
> if[s1valid] s1[k]!=0 then
>
>then force (if any []'s are used) full subscripting, ie
>
>exit[s1valid][s1items][s1subs].
>

Probably not too difficult to implement ( i.e. I can
imagine how it would be done) but difficult to program
with. In principle, I like the idea of labeling nesting
levels to keep track of deeply nested code, but in practice
it never seems to work very well (too much typing -- too
much typographic noise). I might prefer that the language
prevented deep nesting altogether. Only 2 nesting levels
in any subroutine. (This is a guideline I use for my
own programs.)

Karl

-------Phoenix-Boundary-07081998---

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu