KT-1306123.lng or 123.sht is not good name

This commit is contained in:
Andrey Breslav
2012-02-20 21:42:13 +04:00
parent 5eb483b7a7
commit bff62484b1
68 changed files with 233 additions and 220 deletions
@@ -8,8 +8,8 @@ fun main(args : Array<String>) {
// val MILLIS_PER_DAY_ : Long = 24 * 60 * 60 * 1000
// Solution:
val MICROS_PER_DAY : Long = 24.lng * 60 * 60 * 1000 * 1000;
val MILLIS_PER_DAY : Long = 24.lng * 60 * 60 * 1000
val MICROS_PER_DAY : Long = 24.long * 60 * 60 * 1000 * 1000;
val MILLIS_PER_DAY : Long = 24.long * 60 * 60 * 1000
println(MICROS_PER_DAY / MILLIS_PER_DAY)
}
@@ -3,8 +3,8 @@ namespace long.division.solution
import std.io.*
fun main(args : Array<String>) {
val MICROS_PER_DAY : Long = 24.lng * 60 * 60 * 1000 * 1000;
val MILLIS_PER_DAY : Long = 24.lng * 60 * 60 * 1000
val MICROS_PER_DAY : Long = 24.long * 60 * 60 * 1000 * 1000;
val MILLIS_PER_DAY : Long = 24.long * 60 * 60 * 1000
println(MICROS_PER_DAY / MILLIS_PER_DAY)
}
@@ -7,5 +7,5 @@ fun main(args : Array<String>) {
// println(12345 + 5432l)
// Correct syntax:
println(12345 + 5432.lng)
println(12345 + 5432.long)
}
@@ -3,6 +3,6 @@ namespace multicast
import std.io.*
fun main(args : Array<String>) {
println(-1.byt.chr.int)
println((-1).byt.chr.int)
println(-1.byte.char.int)
println((-1).byte.char.int)
}
@@ -5,6 +5,6 @@ import std.*
fun main(args : Array<String>) {
// Note: \u000A is Unicode representation of linefeed (LF)
val c : Char = 0x000A .chr;
val c : Char = 0x000A .char;
println(c);
}
@@ -5,12 +5,12 @@ import std.io.*
fun main(args : Array<String>) {
// for (b : Byte in Byte.MIN_VALUE..Byte.MAX_VALUE) {
// // Problematic code does not compile
// if (b == 0x90 .byt)
// if (b == 0x90 .byte)
// println("joy")
// }
for (b : Byte in Byte.MIN_VALUE to Byte.MAX_VALUE) {
// Problematic code does not compile
if (b == 0x90 .byt)
if (b == 0x90 .byte)
println("joy")
}
}
@@ -3,8 +3,8 @@ namespace ghost.of.looper
import std.io.*
fun main(args : Array<String>) {
var i : Short = -1.sht
while (i != 1.sht)
var i : Short = -1.short
while (i != 1.short)
// Lots of magic made explicit:
i = (i.int ushr 1).sht
i = (i.int ushr 1).short
}