Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 11, 2017 11:07:48 GMT -5
I am getting unpredictable results when I use the change command: c p'^' 1 6 '' all. (No space between the single quotes). However, I get expected results with: c p'^' 1 6 ' ' all. (A space between the single quotes.) I am using the logical not sign instead of the ^ . (I wanted to learn how to change the keyboard character definition). For example, I am running an assembler to assemble a program and want to edit the output for later use. When I use the single space between the single quotes, I get 6 blanks. Expected. However, when I use no space between the single quotes, more than 6 characters are eliminated. I know I've used a similar command in the past. I have attached output. prog03ax.p02 is original output. I've included "original" on the first line. prog03ax.p03 is output using ' ' with results on first line. prog03ax.p04 is output using '' with results on first line. If you need more information, I'll provide it. Thx. Attachments:prog03ax.p02 (11.33 KB)
prog03ax.p03 (11.35 KB)
prog03ax.p04 (10.37 KB)
|
|
|
Post by George on Aug 11, 2017 14:11:07 GMT -5
iprefer432:
Believe it or not, all is working perfectly.
If you want to see what's happening, take the ALL keyword off, and issue the command repeatedly, doing one character at a time.
As you process, you can watch the characters being replaced by nulls, and the remaining portion of the line being 'dragged left'. As soon as you reach a line with generated assembly code, you now have new characters being dragged into columns 1-6, so the change command continues processing the line since it has not 'finished with' the line.
The ALL operand causes the CHANGE command to be repeated - in it's entirety - for the line until the search portion fails, then it moves to the next line.
For what you want, the command should be
CHANGE P'^^^^^^' '' ALL George
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 11, 2017 15:56:41 GMT -5
George,
I understand. I did c p'^^^^^^' 1 6 all and got expected results. Thx.
|
|