next previous up contents index
Next: Leafing Through the File Previous: Setting Of and Going To Markers Up: Functions


Positioning

Positioning means the moving of the current line (compare section Presentation in the Window, Current Line). You may position the current line directly or indirectly.

You use indirect positioning when you either change data directly in the data zone or give a command that changes the position of the current line as a side effect.

If you change data directly, the lowest line that was changed becomes the current line after you have pressed the return key.

In commands that change data, the last line changed becomes the current line. When you delete lines, the previous line becomes the current line. When you insert lines, the last inserted line becomes the current one. The individual explanations of the commands in section The Commands in Detail take account of the behaviour of the current line, i.e. whether it is moved and if yes, what the rules are.

There is a number of commands for direct positioning of the current line. Forward, i.e. towards the end of the file, you apply one of these commands:

- all of them are identical with regard to parameters and execution. The number of records by which you want to move the current line is either 1 (if you do not specify a parameter) or the number n you specified in the command. If you go too far, for example, when you give the command NEXT 5 while the current line is 3 lines in front of the last line, you receive the error message

and the current line stays where it is.

If you want to position the current line on the last data line, you use the command

Backward, i.e. towards the beginning of the file, you position the current line with one of these commands:

- these three are all identical with regard to parameter and execution, as well. They work equivalently to the commands for the forward movements; the only difference is that the error message reads

if you try to go beyond the file.

With the command

you position the current line on the top line. If you want to move the current line on the first data line, you may enter

You can use the command POINT to set the current line to the record given with the command, e.g.

So you can reach the first data line very quickly with With the commands LOCATE and RLOCATE you have the option to go to specific data, and you can also position the current line directly. Compare section Searching, for more detail.

With the command RETURN you can position the current line on a record you have marked before. You find more details on this subject in section Setting of and Going To Markers.

A special kind of positioning is leafing through a file, which will be discussed in the following section.


next previous up contents index
Next: Leafing Through the File Previous: Setting Of and Going To Markers Up: Functions