[Coco] Let's say you wrote a BASIC program the user is invited to change

Juan Castro jccyc1965 at gmail.com
Thu Jul 10 12:45:09 EDT 2025


RENUM, as it is, does the opposite of that: it can renumber from line
X to the end, not from the beginning to line X. Yes, it does make a
lot of sense, but it'll be tricky to implement.

Guess I'll tack that on the to-do section of the README.

Juan Castro
Enviado do meu Olivetti Programma 101
http://retropolis.com.br

Em qui., 10 de jul. de 2025 às 13:31, Allen Huffman via Coco
<coco at maltedmedia.com> escreveu:
>
> > On Jul 10, 2025, at 11:23 AM, Juan Castro via Coco <coco at maltedmedia.com> wrote:
> >
> >> That Syntax looks wacky.
> >
> > I imposed this limitation to myself: only use keywords that already
> > exist in the CoCo.
>
> One thing I want to get in some of the BASIC editor extensions (like the cool CoCoTools for Visual Studio Code) is the ability to force code to stay where it is (subroutines) while RENUMbering everything else.
>
> 5000 REM INPUT
> 5010 LINE INPUT A$:RETURN
>
> 5500 REM OUTPUT
> 5510 PRINT A$:RETURN
>
> There are ALOT of problems trying to do this, but just having it leave lines alone that are marked somehow, so a RENUM would do anything except lines marked. I thought maybe using “:” would work, since you cannot use that on a REM line and do anything:
>
> 5000 REM:INPUT
>> 5500 REM:OUTPUT
>
> Then as it renumbers, it would leave those lines alone, and reset whatever the “current” number is so renumbering starts there as if I did it manually with multiple renums.
>
> Does that make sense?
>
> To do it manually:
>
> 1 PRINT “ENTER YOUR NAME:”;
> 2 GOSUB 5000
> 3 PRINT “HELLO, “;
> 4 GOSUB 5500
> 5 END
> 5000 REM:INPUT
> 5001 LINE INPUT A$:RETURN
> 5500 REM:OUTPUT
> 5501 PRINT A$:RETURN
>
> Then you’d RENUM but you’d get:
>
> 10 PRINT “ENTER YOUR NAME:”;
> 20 GOSUB 5000
> 30 PRINT “HELLO, “;
> 40 GOSUB 5500
> 50 END
> 5000 REM:INPUT
> 5010 LINE INPUT A$:RETURN
> 5500 REM:OUTPUT
> 5510 PRINT A$:RETURN
>
> But I am sure there would be many unforeseen issues.
> --
> Allen Huffman - PO Box 7634 - Urbandale IA 50323 - 515-999-0227 (vmail/TXT only)
> http://www.subethasoftware.com - https://www.facebook.com/subethasoftware
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco


More information about the Coco mailing list