From 8c9f3575182678480bec6e04db0f323299e29530 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 18 Jun 2024 15:55:48 -0400 Subject: update doc. --- renumbas.rst | 42 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) (limited to 'renumbas.rst') diff --git a/renumbas.rst b/renumbas.rst index 7cef711..f71bf01 100644 --- a/renumbas.rst +++ b/renumbas.rst @@ -70,19 +70,31 @@ Renumber Options .. include:: genopts.rst -LIMITATIONS +DIAGNOSTICS =========== -A pathological case:: +Fatal: Program is code-protected; unprotect it first. + Use **unprotbas** to remove the protection, if you get this error. - 100 GOTO 200+0 +Fatal: New line number *num* would be >32767. + 32767 is the highest line number BASIC allows. + Use a lower starting line (**-s**) and/or increment (**-i**). -200+0 is considered a computed line number, even though the results of -the computation are constant. This is because neither Atari BASIC nor -**renumbas** does constant folding. +Warning: Computed *cmd* at line *num*. + The line number for a *GOTO*, *GOSUB*, etc is normally adjusted to + whatever the line got renumbered to. This warning means that **renumbas** + couldn't adjust the line number, because it's a computed value such as + *GOTO A+100*. You'll have to fix this manually. *num* is the original + line number, not the renumbered one. -This shouldn't be a real-world problem; did *you* ever write code like -that in Atari BASIC? +Warning: Line *num1* references nonexistent line *num2*. + Usually indicates a bug in the BASIC program. Example: *GOTO 100*, + but there is no line 100. *num1* is the original line number, not the + renumbered one. + +Renumbering line *num1* as *num2* (*num3* refs). + Only seen when the **-v** (verbose) option is used. Just an informational + message. Warning line numbers -------------------- @@ -92,6 +104,20 @@ the warnings are generated while scanning the program to find line number references, which happens before the actual renumbering (so the new number isn't known yet). +LIMITATIONS +=========== + +A pathological case:: + + 100 GOTO 200+0 + +200+0 is considered a computed line number, even though the results of +the computation are constant. This is because neither Atari BASIC nor +**renumbas** does constant folding. + +This shouldn't be a real-world problem; did *you* ever write code like +that in Atari BASIC? + EXIT STATUS =========== -- cgit v1.2.3