*** empty log message ***
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@4615 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
91912e98ad
commit
ea39e54067
|
@ -0,0 +1,22 @@
|
|||
/* __ *\
|
||||
** ________ ___ / / ___ Scala API **
|
||||
** / __/ __// _ | / / / _ | (c) 2002-2005, LAMP/EPFL **
|
||||
** __\ \/ /__/ __ |/ /__/ __ | **
|
||||
** /____/\___/_/ |_/____/_/ | | **
|
||||
** |/ **
|
||||
\* */
|
||||
|
||||
// $Id$
|
||||
|
||||
|
||||
package scala.runtime.compat;
|
||||
|
||||
class StringBuilder {
|
||||
val str = new System.Text.StringBuilder();
|
||||
def append(x: Any): StringBuilder = {
|
||||
str.Append(x);
|
||||
this
|
||||
}
|
||||
def length(): Int = str.Length;
|
||||
override def toString() = str.toString();
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
/* __ *\
|
||||
** ________ ___ / / ___ Scala API **
|
||||
** / __/ __// _ | / / / _ | (c) 2002-2005, LAMP/EPFL **
|
||||
** __\ \/ /__/ __ |/ /__/ __ | **
|
||||
** /____/\___/_/ |_/____/_/ | | **
|
||||
** |/ **
|
||||
\* */
|
||||
|
||||
// $Id$
|
||||
|
||||
|
||||
package scala.runtime.compat;
|
||||
|
||||
class StringBuilder {
|
||||
val str = new StringBuffer();
|
||||
def append(x: Any): StringBuilder = {
|
||||
str.append(x);
|
||||
this
|
||||
}
|
||||
def length(): Int = str.length();
|
||||
override def toString() = str.toString();
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
1
|
||||
2
|
||||
1/2
|
||||
5/6
|
||||
|
||||
1/3
|
||||
5/7
|
||||
3/2
|
||||
66/42
|
||||
|
||||
1/3
|
||||
5/7
|
||||
3/2
|
||||
11/7
|
||||
|
||||
11/7
|
||||
7/11
|
||||
11/7
|
||||
11/7
|
||||
|
||||
13/36
|
||||
|
||||
False
|
||||
True
|
||||
True
|
||||
False
|
||||
|
||||
set0 = []
|
||||
set1 = [1]
|
||||
set2 = [1,2]
|
||||
set3 = [1,2,3]
|
||||
set4 = [1,2,3,4]
|
||||
|
||||
set2 contains the following elements:
|
||||
1
|
||||
2
|
||||
|
||||
set3 contains the following elements:
|
||||
1
|
||||
2
|
||||
3
|
||||
|
||||
set4 contains the following elements:
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
|
||||
2 <- set2: True
|
||||
3 <- set2: False
|
||||
|
||||
setx = [-10,-1,0,3,5,21]
|
||||
setx * 2 = [-20,-2,0,6,10,42]
|
||||
|
||||
setx = [-10,-1,0,3,5,21]
|
||||
sety = [-9,-5,-1,0,3,7,8]
|
||||
setx & sety = [-1,0,3]
|
||||
sety & setx = [-1,0,3]
|
||||
setx > 0 = [3,5,21]
|
||||
sety > 0 = [3,7,8]
|
||||
setx & sety = [-1,0,3]
|
||||
sety & setx = [-1,0,3]
|
||||
|
||||
1/1
|
||||
1/1
|
||||
1/1
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
Probe: f = 32
|
||||
Probe: c = 0
|
||||
Probe: f = ?
|
||||
Probe: c = ?
|
||||
|
||||
Probe: f = 212
|
||||
Probe: c = 100
|
||||
Probe: f = ?
|
||||
Probe: c = ?
|
||||
|
||||
Probe: c = 0
|
||||
Probe: f = 32
|
||||
Probe: c = ?
|
||||
Probe: f = ?
|
||||
|
||||
Probe: c = 100
|
||||
Probe: f = 212
|
||||
Probe: c = ?
|
||||
Probe: f = ?
|
||||
|
||||
0 Celsius -> 32 Fahrenheits
|
||||
100 Celsius -> 212 Fahrenheits
|
||||
32 Fahrenheits -> 0 Celsius
|
||||
212 Fahrenheits -> 100 Celsius
|
||||
|
||||
a = ?, b = ?, c = ? => ? * ? = ?
|
||||
a = 2, b = ?, c = ? => 2 * ? = ?
|
||||
a = ?, b = 3, c = ? => ? * 3 = ?
|
||||
a = ?, b = ?, c = 6 => ? * ? = 6
|
||||
a = 2, b = 3, c = ? => 2 * 3 = 6
|
||||
a = 2, b = ?, c = 6 => 2 * 3 = 6
|
||||
a = ?, b = 3, c = 6 => 2 * 3 = 6
|
||||
a = 2, b = 3, c = 6 => 2 * 3 = 6
|
||||
|
||||
a = 0, b = ?, c = ? => 0 * ? = 0
|
||||
a = ?, b = 0, c = ? => ? * 0 = 0
|
||||
a = ?, b = ?, c = 0 => ? * ? = 0
|
||||
a = 0, b = 7, c = ? => 0 * 7 = 0
|
||||
a = 7, b = 0, c = ? => 7 * 0 = 0
|
||||
a = 0, b = 0, c = ? => 0 * 0 = 0
|
||||
a = 0, b = ?, c = 0 => 0 * ? = 0
|
||||
a = ?, b = 0, c = 0 => ? * 0 = 0
|
||||
a = 0, b = 7, c = 0 => 0 * 7 = 0
|
||||
a = 7, b = 0, c = 0 => 7 * 0 = 0
|
||||
a = 0, b = 0, c = 0 => 0 * 0 = 0
|
||||
|
||||
a = 3, b = 4 => c = 5
|
||||
a = 3, c = 5 => b = 4
|
||||
b = 4, c = 5 => a = 3
|
||||
|
Loading…
Reference in New Issue