swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax    
action  

activate, deactivate

 
 

Syntax

  activate (switch-name) indexer?

  deactivate (switch-name) indexer?


Purpose

activate sets the value of a switch to true. deactivate sets the value of a switch to false. Thus:

  activate foo 
is equivalent to
  set foo to true

For shelves:

  deactivate bar[3]
is equivalent to
  set bar[3] to false 

Putting these fragments together to make a program, you can run the following:

  process
     local switch foo
     local switch bar variable initial-size 3 initial {true, false, true}
     activate foo
     set foo to false
     do when foo = true
        output "Switch foo is true!%n"
     else
        output "Switch foo is false!%n"
     done
     deactivate bar[3]
     set bar[3] to true
     do when bar = true
           output "Switch bar is true!%n"
        else
           output "Switch bar is false!%n"
     done
  ;Output: "Switch foo is false!
  ;         Switch bar is true!"

Obviously, activate and deactivate cannot be used when the switch value is calculated, so setting values to true or false is more generally useful. You can, however, use activate and deactivate to set several values at once:

  activate tom and dick and harry

    Related Syntax
   true, false
 
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:44:56 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.