About the Gate Primitive

The gate primitive is designed to force a branch in a Logical Look-Ahead to fail while not interfering with calculations at other times. If one of the primitives And/Or is active and the system is attempting to evaluate a Boolean expression without prompting the user, gate causes the current branch being explored to fail. In all other cases, gate is benign.

See gate.

All input primitives have the functionality of the gate primitive built in. The purpose of the gate primitive is to tell DScript which calculations are expensive in terms of user effort and time. If you are getting information from a source other than the user and the source is slow, you might want to gate access to the source.

For example, if you build an application using stock prices pulled from the Internet as an input, you may want your application to retrieve the price only when necessary. This is accomplished by changing a node from:

Price:=StockPrice("IBM")

to:

Price:=gate(StockPrice("IBM"))

With the latter expression, DScript avoids pulling data from the Internet if there is another way to draw a complete conclusion.

See Boolean Operators.