Quick Navigator

 Search Site Miscellaneous Server Agreement Year 2038 Credits

# Manual Reference Pages  -  MATH::EXPR::VAR (3)

.ds Aq ’

### NAME

```

Math::Expr::Var - Represents one variable in a parsed expression tree

```

### SYNOPSIS

```

require Math::Expr::Opp;
require Math::Expr::Var;
require Math::Expr::Num;

# To represent the expression "x+7":
\$n=new Math::Expr::Opp("+");
\$n->SetOpp(0,new Math::Expr::Var("x"));
\$n->SetOpp(1,new Math::Expr::Num(7));
print \$n->tostr . "\n";

```

### DESCRIPTION

```

Used by the Math::Expr to represent variables.

```

### METHODS

#### CW\$n=new Math::Expr::Var(\$name)

```

Creates a new representation of the variable named \$name.

```

#### CW\$n->tostr

```

Returns the string representation of the variable, that is the
variable name.

```

#### CW\$n->strtype

```

Returns the type of the variable.

```

#### CW\$n->BaseType

```

Simply cals strtype, its needed to be compatible with the other
elements in the structure.

```

#### CW\$n->Match

```

Mathces a rule expression with the variable, and returns an array of
VarSet objects with this variable name set to the expression if there
types match.

```

#### CW\$n->SubMatch

```

Used by upper level Match procedure to match an entire expression.

```

#### CW\$n->Subs(\$vars)

```

Returns this variables vaule taken from \$vars or a new copy of itselfe
if it does not excist.

```

#### CW\$n->Copy

Returns a new copy of itself.

### AUTHOR

```

Hakan Ardo <hakan@debian.org>

```

```

L<Math::Expr::Opp>

```
Search for    or go to Top of page |  Section 3 |  Main Index

 perl v5.20.3 EXPR::VAR (3) 1998-12-19

Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.