File: mathalgtest.crm

package info (click to toggle)
crm114 20060704a-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,848 kB
  • ctags: 630
  • sloc: ansic: 17,713; sh: 536; makefile: 351; lisp: 208
file content (32 lines) | stat: -rwxr-xr-x 865 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/crm
#
#	Test demo program for extended eval (can do string lengths,
#       algebraic math, and inequalities. 
window
output / \n  Algebraic math test \n/   
{ 
	isolate (:z:) 
	isolate (:x:) /12345/
	isolate (:pi:) /3.14159/
	output / string value of x is :*:x:, string value of pi is :*:pi:\n/
	eval (:z:) / length of x is :#::*:x:: , length of pi is :#::*:pi::\n/
	output /:*:z:/
	{
		{
			eval (:z:) /:@: :#::*:x:: > :#::*:pi:::/
			output / string rep of X is longer than pi\n/
		}
		alius
		{
			output / string rep of X is shorter than pi\n/
		}
	}
	eval (:z:) / matheval of x + pi is :@:    :*:x: + :*:pi: :\n/
	output /:*:z:/
	eval (:z:) /:@: (2 * 3) + ( 4 * 5) :/
	output / Algebraic matheval of (2*3)+(4*5) is :*:z: \n/
	eval (:z:) /  and adding 3.14159 to that is :@: :*:z: + 3.14159:\n/
	output /:*:z:/
	#output /With TDW: >:*:_iso:<\n/ 
}