next | previous | forward | backward | up | top | index | toc | Macaulay2 website
SLPexpressions :: declareVariable

declareVariable -- assigns an input gate to a given variable name



This method assigns an InputGate which has the same Name as the given symbol or the baseName of the given IndexedVariable, so that later references to the symbol will be treated (and can be used) as an InputGate. This can be reverted with undeclareVariable.

i1 : declareVariable x

o1 = x

o1 : InputGate
i2 : x + 1

o2 = (x + 1)

o2 : SumGate

See also

Ways to use declareVariable :

For the programmer

The object declareVariable is a method function.