HomeQuery commandsTesting the destination languageTesting the operating system
User Manual UDO > The UDO syntax > Miscellaneous > Query commands Index

Testing symbols

With the !ifset command you can test if a symbol was set in the preamble or via command line. The !ifnset tests if a symbol is not set.

As you know you can set symbols via command line by using the option -D and by the command !set.

The following example shows how to test the symbol UseColour and to display the right image:

!ifset [UseColor]
!image colour/tiger
!else
!image mono/tiger
!endif

If you call UDO with passing the option -D UseColor or if you set the symbol with !set UseColor inside the preamble UDO will display the color image instead of the monochrome image.


Copyright © www.udo-open-source.org (Contact)
Last updated on May 19, 2014

HomeQuery commandsTesting the destination languageTesting the operating system