2013-03-03 81 views
1

我開始用TouchDevelop編程,但我輸入了下面的錯誤。字符串與TouchDevelop的Concat錯誤

action main()  
var strings := collections → create string collection  
strings → set at(1, "I")  
strings → set at(2, "II")  
strings → set at(3, "III")  
strings → set at(4, "IV")  
strings → set at(5, "V")  
strings → set at(6, "VI")  
var x := math → random(6) + 1  
var s := strings → at(x)  
"The value of dice is " → concat(s) → post to wall # ERROR AT CONCAT(S) 
+0

而這必須做帕斯卡..? – Thomas 2013-03-03 09:26:08

+1

@Thomas,恰恰沒有...... :-)我已經創建了一個全新的[tag:touchdevelop]標籤,但是由於它剛剛創建,所以沒人會注意到這個問題。你有什麼想法,哪些標籤增加了這個問題?雜草,你能給你的問題添加一些標籤以引起更多關注嗎? – TLama 2013-03-03 09:33:43

+1

對不起,托馬斯。謝謝你,TLama。我添加了兩個標籤'string'和'arrays'。我會等一會兒。 – weed 2013-03-04 00:33:15

回答

0

對於touchdevelop語言,您希望使用字符串連接字符,即| 。 你行應爲:

"The value of dice is " || s → post to wall 

雙管字符可以在第三個菜單的左邊旁的數學運算符可以找到,如果你使用的是Windows Phone 7的