1SUBSTABLEXPR(3) ABL FUNCTIONS SUBSTABLEXPR(3)
2
3
4
6 substablexpr - substitutes a given atom by an expression.
7
8
10 #include "abl101.h"
11 chain_list ∗substablexpr( Expr1, Name, Expr2 )
12 chain_list ∗Expr1;
13 char ∗Name;
14 chain_list ∗Expr2;
15
17 Expr1 First expression.
18
19 Name Atom name.
20
21 Expr Second expression.
22
24 substablexpr substitutes Atom in Expr1 by Expr2. The expression
25 pointer Expr1 MUSTN'T be used after the call to this function.
26
28 substablexpr returns the modified expression.
29
31 #include "abl101.h"
32 chain_list ∗Expr1;
33 chain_list ∗Expr2;
34 Expr1 = createablbinexpr( ABL_OR,
35 createablatom( "a" ),
36 createablatom( "b" ) );
37 Expr2 = createablbinexpr( ABL_AND,
38 createablatom( "c" ),
39 createablatom( "d" ) );
40 Expr1 = substablexpr( Expr1, "a", Expr2 );
41 /* displays ((c and d) or b) */
42 viewablexpr( Expr1, ABL_VIEW_VHDL );
43
45 abl(1), substdupablexpr(3).
46
47
48
49
50
51
52ASIM/LIP6 October 1, 1997 SUBSTABLEXPR(3)