ruby函数调用

来源:互联网 发布:公章可以在淘宝上刻吗 编辑:程序博客网 时间:2024/06/11 03:11
#! /usr/bin/ruby
# encoding:gbk


nums = Array.new(10) { |e| e = e * 2 }


def test(paraList)
    $i = 0
    $num = 30
    for i in 0...$num
    if i == 2 || i == 3
    next
    end
    puts "局部变量为 #{i}"
end
end


test "#{nums}"
0 0
原创粉丝点击