That is just a more verbose way of saying what I already said. On Sun, 9 Dec 2018 at 19:04, John R. Hogerhuis <jho...@pobox.com> wrote: > > " It seems that a limitation of the model > 100 is that if you gosub to a subroutine, and then gosub again, it > will forget that it is it in a subroutine, and not understand the > retrurn statement." > > That's not how it works. GOSUB stacks addresses. It means your gosubs and > returns are not balanced, which is a bug in your code. > > Think of a GOSUB as pushing the location of the next BASIC command onto a > stack. > > At some point, you RETURN and it pops that location from the stack and jumps > there. > > If you get a "RETURN without GOSUB" it means you tried to RETURN when the > stack was empty! > > -- John.
- Re: [M100] Olivetti M10 and REX Stephen Adolph
- Re: [M100] Olivetti M10 and REX John R. Hogerhuis
- Re: [M100] Olivetti M10 and REX Stephen Adolph
- Re: [M100] Olivetti M10 and REX Gregory McGill
- Re: [M100] Olivetti M10 and REX Josh Malone
- Re: [M100] Olivetti M10 and REX Stephen Adolph
- [M100] BASIC trick Peter Vollan
- Re: [M100] BASIC trick Scott Lawrence
- Re: [M100] BASIC trick Peter Vollan
- Re: [M100] BASIC trick John R. Hogerhuis
- Re: [M100] BASIC trick Peter Vollan
- Re: [M100] BASIC trick John R. Hogerhuis
- Re: [M100] BASIC trick Brian White
- Re: [M100] BASIC trick John R. Hogerhuis
- Re: [M100] BASIC trick Jerry Stratton
- Re: [M100] BASIC trick John R. Hogerhuis
- Re: [M100] BASIC trick Scott Lawrence
- Re: [M100] BASIC trick John R. Hogerhuis
- Re: [M100] BASIC trick JOHN JR & VIRGINIA WHITTON
- [M100] Basic... Peter Vollan