1MAPABLOPEREXPR(3) ABL FUNCTIONS MAPABLOPEREXPR(3)
2
3
4
6 mapabloperexpr - applies a function to all operands.
7
9 #include "abl101.h"
10 chain_list ∗mapabloperexpr( Function, Oper, Expr )
11 chain_list ∗ (∗Function)();
12 long Oper;
13 chain_list ∗Expr;
14
16 Function Function name to apply to all operands.
17
18 Oper Operator number.
19
20 Expr Expression to scan.
21
23 mapabloperexpr applies Function to all operands of Expr.
24 mapabloperexpr creates a head of an operator expression having
25 Oper as operator and adds the arguments calculated by applying
26 Function to each arguments of Expr. Function must return an
27 expression and must have a unique expression as argument.
28
30 mapabloperexpr returns a new expression by applying Function to
31 all the arguments of the operator expression Expr.
32
34 #include "abl101.h"
35 chain_list ∗MapFunction( MapExpr )
36 chain_list ∗MapExpr;
37 {
38 return( createablnotexpr( dupablexpr( MapExpr ) ) );
39 }
40 chain_list ∗Expr;
41 chain_list ∗Expr1;
42 Expr = createablbinexpr( ABL_NOR,
43 createablatom( "a" ),
44 createablatom( "b" ) );
45 Expr1 = mapabloperexpr( MapFunction, ABL_AND, Expr );
46 /* displays ((not a) and (not b)) */
47 viewablexpr( Expr1, ABL_VIEW_VHDL );
48
50 abl(1)
51
52
53
54
55
56
57ASIM/LIP6 October 1, 1997 MAPABLOPEREXPR(3)