projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2004-09-23 Sebastien Pouliot <sebastien@ximian.com>
[mono.git]
/
mcs
/
tools
/
sample_cast_const.cs
diff --git
a/mcs/tools/sample_cast_const.cs
b/mcs/tools/sample_cast_const.cs
index a6064bf9c43ce1071433b905664f6726abb999fc..04969312cde2ba2e18a9c930d12defdb4a8a2790 100755
(executable)
--- a/
mcs/tools/sample_cast_const.cs
+++ b/
mcs/tools/sample_cast_const.cs
@@
-3,7
+3,7
@@
using System;
class X {
static void w (string s)
{
class X {
static void w (string s)
{
- Console.WriteLine (s);
+ Console.WriteLine (
"\t" +
s);
}
static void Main ()
}
static void Main ()
@@
-27,16
+27,20
@@
class X {
string small = "TypeManager." + names [i, 1] + "_type";
string nat = ((string) names [i,0]).ToLower ();
string small = "TypeManager." + names [i, 1] + "_type";
string nat = ((string) names [i,0]).ToLower ();
- w ("\t\tif (expr is " + big + "
Constant
){");
- w ("\t\t\t" +
big
+ " v = ((" + big + ") expr).Value;");
+ w ("\t\tif (expr is " + big + "){");
+ w ("\t\t\t" +
nat
+ " v = ((" + big + ") expr).Value;");
w ("");
for (int j = 0; names [j,0] != null; j++){
w ("");
for (int j = 0; names [j,0] != null; j++){
+ string b = names [j, 0] + "Constant";
+ string s = "TypeManager." + names [j, 1] + "_type";
+ string n = ((string) names [j,0]).ToLower ();
+
if (i == j)
continue;
if (i == j)
continue;
- w ("\t\t\tif (target_type == " + s
mall
+ ")");
- w ("\t\t\t\treturn new " + b
ig + "((" + nat
+ ") v);");
+ w ("\t\t\tif (target_type == " + s + ")");
+ w ("\t\t\t\treturn new " + b
+ " ((" + n
+ ") v);");
}
w ("\t\t}");
}
}
w ("\t\t}");
}