All locate targets produce the results as stated in the question assignment !
For those that didn't come to this conclusion, we suggest to try them out again. Verify however that you don't use a PROFILE XEDIT or other macro that changes the behaviour of XEDIT...
Pointing seems not very well known by some users. It is a very useful feature of XEDIT. Therefore, let's review it briefly:
If you use the .xyz command on the prefix of a line, then XEDIT remembers that line as 'pointed to' by label xyz. This label can, from then on, be used as a target specification in all commands that accept targets as parameters. You can for example issue the command locate .xyz command (or just .xyz for short) from the command line to go to the pointed line.
Another case where the label can be used is for example:
change /-/+/.xyz *
This will change all minus signs into plus signs starting from the current line up to the target which is the line pointed by .xyz, and this even in backward direction if the pointed line is prior to the current line !
You can also label a line via the [set] point .label command. It labels the current line and is handier to use in XEDIT macros.
This feature is especially useful when editing large files or procedures, where you could for example label your subroutines (a pointing label can have from 1 to 8 characters, except via the prefix where you only have the place for 4 characters).
It's a pity that XEDIT doesn't remember the labels or pointers when you leave XEDIT. It may be a good exercise to write a macro that replaces the standard FILE, SAVE or QUIT commands, and does the save of the labels in GLOBALV variables. When the same file is edited later, the labels are restored via the PROFILE XEDIT. Who is coming up with a new goodie that does this ?
In practice, we personally use pointing as follows:
We use only a few different label names as it becomes difficult to remember the labels when there are more of them (unless you follow our suggestion and assign labels that have the same name as the subroutine).
If we want to mark a block of lines (similar to the way
many PC editors allow you to do), then issue the .bb
and .eb commands respectively on the first line of the
block (Begin Block) and on the last+1 line of the block (End Block).
We hope you understand why you have to put the end of the block on the
last+1 line...
Then, for example, to PUT this block of lines out to another file,
you could issue the subcommand
.bb put .eb new file a
on XEDIT's command line.
When writing XEDIT macros, labeling a line is almost the only way to be able to return to the current line at termination of the macro. This is especially true if the macro adds or deletes lines preceding the current line on the screen...
The DELALL XEDIT goodie uses the pointing technique. This macro allows you to delete all records that contain a certain string.
Use the backward navigation button of your browser to return to the lesson text.