PxPlus User Forum
Main Board => Discussions => Language => Topic started 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.
- a single non-zero digit adds that to the previous line# (assuming a previous spacing of '10'
- a 2nd digit of zero (eg 10,100) restarts the numbering at the next 10s or 100s place
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
-
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
-
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!
-
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.