Strange variable assignment in Swift with RemObjects Silver

180 views Asked by At

I'm trying to convert a String to a Char array in Swift. I use RemObjects' Silver compiler with Visual Studio. However, printing the array doesn't give the same result wether using an intermediate variable or not!

var text: String = Console.ReadLine().uppercaseString()
var textChar = [Char](text)

for var index = 0; index < textChar.count; index++ {
    println(textChar[index]) // Correct
    var a = textChar[index]  // Wrong result
    println(a)
}

Any idea to solve this problem?

0

There are 0 answers