1SUBSTDUPABLEXPR(3) ABL FUNCTIONS SUBSTDUPABLEXPR(3)
2
3
4
6 substdupablexpr - substitutes a given atom by an expression.
7
8
10 #include "abl101.h"
11 chain_list ∗substdupablexpr( 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 substdupablexpr duplicates and substitutes Atom in Expr1 by Expr2.
25
27 substdupablexpr returns the duplicated and modified expression.
28
30 #include "abl101.h"
31 chain_list ∗Expr1;
32 chain_list ∗Expr2;
33 chain_list ∗Expr3;
34 Expr1 = createablbinexpr( ABL_OR,
35 createablatom( "a" ),
36 createablatom( "b" ) );
37 Expr2 = createablbinexpr( ABL_AND,
38 createablatom( "c" ),
39 createablatom( "d" ) );
40 Expr3 = substdupablexpr( Expr1, "a", Expr2 );
41 /* displays ((c and d) or b) */
42 viewablexpr( Expr1, ABL_VIEW_VHDL );
43
45 abl(1), substablexpr(3).
46
47
48
49
50
51
52ASIM/LIP6 October 1, 1997 SUBSTDUPABLEXPR(3)