• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

8.2 Coroutining
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Constraint Logic Programming
        • Coroutining
          • dif/2
          • freeze/2
          • frozen/2
          • when/2
          • call_residue_vars/2
    • Packages
Availability::- use_module(library(when)).(can be autoloaded)
Sourcewhen(@Condition, :Goal)
Execute Goal when Condition becomes true. Condition is one of ?=(X, Y), nonvar(X), ground(X), ,(Cond1, Cond2) or ;(Cond1, Cond2). See also freeze/2 and dif/2. The implementation can deal with cyclic terms in X and Y.

The when/2 predicate is realised using attributed variables associated with the module when. It is defined in the autoload library library(when).

ClioPatria (version V3.1.1-51-ga0b30a5)