File: rtest13s.mac

package info (click to toggle)
maxima 5.49.0-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 128,980 kB
  • sloc: lisp: 437,854; fortran: 14,665; tcl: 10,143; sh: 4,598; makefile: 2,204; ansic: 447; java: 374; python: 262; perl: 201; xml: 60; awk: 28; sed: 15; javascript: 2
file content (58 lines) | stat: -rw-r--r-- 1,083 bytes parent folder | download | duplicates (18)
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);