nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gamnit: move `new SmoothMaterial::default` to `new Material`
[nit.git]
/
tests
/
example_string.nit
diff --git
a/tests/example_string.nit
b/tests/example_string.nit
index
106e498
..
8824617
100644
(file)
--- a/
tests/example_string.nit
+++ b/
tests/example_string.nit
@@
-18,9
+18,6
@@
# It displays the value of a local variable.
# It exhibs ways to concatenate strings.
# It displays the value of a local variable.
# It exhibs ways to concatenate strings.
-#alt1 import standard
-#alt1 import standard::text::ropes
-
var a = 10
# First way: Multiple parameters.
# Pro: Simple.
var a = 10
# First way: Multiple parameters.
# Pro: Simple.
@@
-31,7
+28,6
@@
printn("The value of a is: ", a, ".\n")
# Pro: Eiffel way (rigourous).
# Con: Eiffel way (heavy).
var s: Buffer = new FlatBuffer.from("The value of a is: ")
# Pro: Eiffel way (rigourous).
# Con: Eiffel way (heavy).
var s: Buffer = new FlatBuffer.from("The value of a is: ")
-#alt1 s = new RopeBuffer.from("The value of a is: ")
s.append(a.to_s)
s.append(".\n")
printn(s)
s.append(a.to_s)
s.append(".\n")
printn(s)
@@
-49,4
+45,4
@@
printn("The value of a is: " + a.to_s + ".\n")
# Fiveth way: Join arrays.
# Pro: Sometime efficient on complex concatenation.
# Con: Crazy.
# Fiveth way: Join arrays.
# Pro: Sometime efficient on complex concatenation.
# Con: Crazy.
-printn(["The value of a is: ", a.to_s, ".\n"].join(""))
+printn(["The value of a is: ", a.to_s, ".\n"].join)