• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Stdout("Test math ================");
2// 测试加减乘除
3a = 3 + 10;
4b =  5 + 6;
5c = (a + b) * (a - b);
6
7f = (a + b) / (a - 3);
8
9Stdout("1+2*3 ", 1+2*3);
10Stdout("1+2/3 ", 1+2/3);
11
12e1 = 0.5;
13f = e1 * 100;
14// 失败,除0
15//f = f / 0;
16
17Stdout(a, b, c, f);
18
19str = "dddddddddd";
20str = str + a;
21
22// 失败,脚本执行退出
23//a = a + str;
24
25Stdout(str);
26
27
28t1 = 3.0 + 10.0;
29t2 =  5 + 6;
30t3 = (t1 + t2) * (t1 - t2);
31t4 = t1 / t2;
32if (t3 > t4) {
33	Stdout(t1, t2, t3, t4);
34}
35Stdout(t1, t2, t3, t4);
36
37
38
39