Flips

Hints for implementing clickable "flips" (= links) in display parameters 

This is a subject for parameter connaisseurs, not for the regular end-user! 

In a99/alcarta, Flips are very much like hyperlinks. Different from HTM, Flips can do more than just bring up other texts; they can start functions or other programs. These functions have to be programmed in a macro language called `FLEX`. 

For those familiar with the DOS flip method: 
For alcarta/a99, all  Flips can be constructed in the same way. 
The section #-`` in the display parameters is thereby made obsolete. 

Every Flip needs three things: 

1. What the user sees (mostly looks like an HTML hyperlink) 
2. A #uYx Variable to connect 1. with 3.: 
3. A #uZx Variable: It contains the Flip command to be executed when the link is clicked on. 
   or it contains a FLEX command string itself (see `FLEX Docu`) 

Example: The contents of  #31s (topical subject terms) have to be formatted as clickable flips. 
#31 can contain any number of terms separated by "; " 
The flip should open the index at the point where the term is situated. 
To parametrize this, follow this recipe: 

   Recommended standard text elements: 
69=160 t74 t97       Code 160, blue, underline on 
68=t96 t76 160       underline off, black, Code 160 
.... 
#nr dY~ dZ~    remove all existing flips 
....... 
#31s =sw e0      copy complete  #31s contents to #usw 

#-S     Loop begins here 
#usw e";" F" " p"?|3" =Z~       prepare next  #uZi 
#usw e";" F" " y1 =Y~           flip text #uYi belonging to #uZi (y1 converts the special characters!) 
#usw C e";" F" " p69 P68        Clickable flip text for display 
#usw +S b";" f" " =sw           Chop first pert of #usw, back to #-S for next part 

This loop producs  #uZ0, #uZ1, ... and #uY0, #uY1, ... These combine pairwise. 
Code 160 is an invisible ANSI character and functions as a marker for the flip text. When clicking, the program looks for these markers. 
Instead of the 160, you can use the square brackets [...]. 
The text element numbers have these meanings  (defined in d-rtf.apt): 

74 = blue color 
76 = normal color (schwarz) 
97 = underline on 
96 = underline off 

Subject terms will appear separately, blue and underlines, and the markers enable the program to copy the underlines string from the screen and compare it with the  #uY Variables. The cooresponding  #uZ Variable will be interpreted as a command. 
These commands can be used in a #uZ Variable (Mind the blanks!) 

f per name..     avanti find command 
f #nnn           load record nnn (internal number) 

?|ixyz		 Show index i at xyz 

h name           Load help text nameENG.RTF (or name.rtf if it does not exist) 

~prog            Start the external program prog or the name of a batch file 

x flextext       x can be followed by a `FLEX` command string. 
X Dateiname      X must be followed by the name of a FLEX file. 

If a Flip doesn't work: use Alt+r to display the background store. There, you see what  #uYi and #uZi actually contain.  #uYi must be identical with the marked flip text in the display field . 

?FLEX=h flex 
?FLEX Docu=h flex 
?Phrasendatei=h phras