PxPlus User Forum

Main Board => Discussions => Language => Topic started by: dalem on May 15, 2019, 12:08:34 PM

Title: Better documentation of rem/renumber?
Post by: dalem on May 15, 2019, 12:08:34 PM
The current REM (!) and renumber documentation is a bit vague. While it does disclose that:
 If a remark line starts with a number (e.g. 4000 REM 4000), PxPlus uses the number as the absolute line number

It fails to detail other effects. Below is example of several variations.

After that, it breaks down....is there anything to make sense of this?

01050 !
01060 !
01061 ! ^1
01071 !
01080 ! ^10
01090 !
01100 ! ^11 ignored? 10?
01110 !
01221 ! ^111 ??
01231 !
01265 ! ^115
01275 !
01477 ! ^211
01487 !
01500 ! ^100
01510 !
01520  return
Title: Re: Better documentation of rem/renumber?
Post by: James Zukowski on May 15, 2019, 12:16:45 PM
Specifying a "^##" value restarts the numbering at the next multiple of "##". Therefore:

1100 = 11 * 100
1221 = 11 * 111
1265 = 11 * 115
1477 = 7 * 211
1500 = 15 * 100
Title: Re: Better documentation of rem/renumber?
Post by: dalem on May 15, 2019, 01:54:10 PM
OK, that makes sense.
What I really wanted was to see if there was a way, regardless of the current range, to make the line specific.
e.g. if I have a routine start at 1100 (8 lines @ incr 10 to make range 1100-1170, I want a specific line 1190...if I add 5 lines and renumber 1100+ to 1100 incr 10, the range would become 1100-1220, that end line would now be 1290.
So, from what you've shown 1190!^90 would be reduced to 1170, then move out to 1260 when lines were added.

Ah well!
Title: Re: Better documentation of rem/renumber?
Post by: James Zukowski on May 15, 2019, 02:01:03 PM
If you want to start at a specific line, specify that line#:

0100 ! 200

after renumber would be:

0200 ! 200

If you include the "^" before the renumber value, then the multiplier effect kicks in.