Silverfrost Logo About Us | Contact Us

Conditional Hypertext

The ClearWin+ BROWSER program uses conditional hypertext to display different information depending on the programming language selected.

For example:

Call the <if Fortran> WINIO@ <else> winio </if> function to display a window.

This uses an named integer parameter with the name 'Fortran', set up using the set_clearwin_info@ function. The <if> clause is selected if the parameter is non-zero. The <else> clause is optional. Conditional constructs can be nested, and may contain arbitrary amounts of other mark-up codes and text.

If a call-back function changes the value of a parameter referenced in a conditional construction, it should either return 1 (to cause all controls in the window to be updated) or use window_update@ to ensure that the hypertext is updated.

To get a working example of the use of this format code, open the browse.htm file and the associated program browse.cpp.

For example:

     WINAPP 0,0,'resource.rc'
c--- Only call the next line once.---
     CALL add_hypertext_resource@('hyperhelp')
     i=winio@('%ca[Hypertext help system]&')

Where resource.rc contains:

hyperhelp HYPERTEXT 'helpfile.htm'

A summary of ClearWin+ hypertext functions is given in Hypertext functions.



Copyright © 1999-2017 Silverfrost Limited