Please enable JavaScript to view this site.

A-Shell Consolidated Reference

Navigation: APN > Usage

Jumping from References to Definitions

Scroll Prev Top Next More

One of the more common editing-related tasks we do while programming is to jump back and forth between uses or references to identifiers (variable, label, function name, symbol) and the definitions of those identifiers. A set of APN scripts can be very handy here. First, use the Goto Identifier Def script to locate the identifier’s definition by positioning the cursor somewhere on the identifier, and double-clicking on the “Goto Identifier Def” script, or preferably, use the keyboard shortcut (normally Ctrl+Alt+G)...

apn1_img34

Assuming that the function can match the current file to one of the main program files currently open, and that it has been saved or compiled recently enough to contain the definition for the identifier, it should jump directly to that location, opening the file (in this case, ashinc:ashell.def) if necessary:

apn1_img35

Then, to return back to the location where you were, use the Go Back function (again, preferably by its shortcut (normally Ctrl+Alt+B):

apn1_img36

which takes you back to where you were:

apn1_img37

and from here the Go Forward (Ctrl+Alt+F) will again jump in the other direction (i.e. drill back to down).

This capability can be nested 10 levels deep, so in other words you can use the Go Back and Go Forward commands to navigate between the last 10 saved positions. Positions are automatically saved each time you open an include file or search for an identifier definition; you may also manually save the position using the Push Position script command.