次のPictRubyで以下のような対話型のプログラムが簡単に書けるようになる。 スクリプトはこんな感じ。(書き方は模索中、そのうち変わるかも) def chat(input) @num ||= 0 case input when "name", "Name" "My name is Rubo" when "Rubo" "Yes, my load." when "help", "Help" <<EOF Echo your message name: teach my name halt: stop this program EOF when "halt", "Halt" aaaa else @num += 1 "#{@num}: #{input}" end end 今までのプログラムと同居するために、スクリプトにchatとmainどちらの関数が定義されているかを調べて、生成するViewCon