File: rtest13s.mac

package info (click to toggle)
maxima 5.21.1-2squeeze
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 94,928 kB
  • ctags: 43,849
  • sloc: lisp: 298,974; fortran: 14,666; perl: 14,325; tcl: 10,494; sh: 4,052; makefile: 2,975; ansic: 471; awk: 24; sed: 7
file content (58 lines) | stat: -rw-r--r-- 1,083 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*************** -*- Mode: MACSYMA; Package: MAXIMA -*-  ******************/
/***************************************************************************
***                                                                    *****
***     Copyright (c) 1984 by William Schelter,University of Texas     *****
***     All rights reserved                                            *****
***************************************************************************/

infix("|");
"|"$

exp1:{x | x > 0};
set(x | x > 0)$

exp2:{x | x < 2};
set(x | x < 2)$

infix("ou");
"ou"$

infix("oi");
"oi"$

exp1 ou exp2;
set(x | x > 0) ou set(x | x < 2)$

exp1 ou exp2;
set(x | x > 0) ou set(x | x < 2)$

exp1:{1,2,3};
set(1,2,3)$

{3,4,5};
set(3,4,5)$

exp1 ou exp1 ou %;
set(1,2,3) ou set(1,2,3) ou set(3,4,5)$

infix("ou",100,100);
"ou"$

exp2:infix("oi",120,120);
"oi"$

exp1 ou exp1 ou {7};
set(1,2,3) ou set(1,2,3) ou set(7)$

/* Make sure we didn't make the uppercase versions also operators */
x + OU;
x + OU$
x + OI;
x + OI$
/*kill("ou");*/
remove("ou",operator);
done$
foo(ou);
foo(ou);