next up previous contents
Next: The MCVX_BACKTRACK DQF Up: Backtracking Previous: Backtracking   Contents


The GET_LINK DQF

A link is defined using the GET_LINK DQF as follows:-

 
' _my_vx    get_link   mcpm-$KMCPM_MCVX;                '
GET_LINK takes a single argument (it can take a second - see 6.7.2) that is the MCVX from which you want to start. GET_LINK does not return the data the link points to but instead returns the link itself. As this won't be useful once the n-tuple is output, it is treated as a temporary variable, even if you don't use an underscore as the first character of it name. Although you really don't want to know, GET_LINK actually saves the link in a special link area, so that it is protected against memory relocation, and in fact only stores a 1. in the value. However, the only reason to use this DQF is to access the link subsequently, for example:-

 
' revent   magnitude         _my_vx+$KMCVX_PSX;         '
This results in the link being retrieved and used as if _my_vx was the scanned point. Don't think that you can take a peek at a links value like this:-

 
' sneaky   equals         _my_vx;         '
You will get the value of the word _my_vx points to in IQ/RQ.

One use of this feature would be to extend the reach of the link step logic. If you run out of steps you could save the last step as a link (GET_LINK can record any sort - it does not have to be an MCVX) and then set off again from there using the saved link as the staring point. However the main reason for saving the link is to pass it to the MCVX_BACKTRACK DQF.


next up previous contents
Next: The MCVX_BACKTRACK DQF Up: Backtracking Previous: Backtracking   Contents
sno Guest Acct 2009-09-09