本帖最后由 876加几 于 2014-7-30 17:50 编辑
我会Ruby、VB和VB.NET。
代码演示:
array = [1,2,3,4] array.clear p array #=>[] p array[0] #=> nil class Array def self.plus(ary1, ary2) return ary1 + ary2 end end p Array.plus([1],[2]) #=>[1,2]
array = [1,2,3,4]
array.clear
p array #=>[]
p array[0] #=> nil
class Array
def self.plus(ary1, ary2)
return ary1 + ary2
end
end
p Array.plus([1],[2]) #=>[1,2]
Dim i As Integer For i = 0 To 10 MsgBox(i.ToString) '=>0~10 End For '其实是VB.NET
Dim i As Integer
For i = 0 To 10
MsgBox(i.ToString) '=>0~10
End For
'其实是VB.NET
好了,请大家尽快投票吧。 |