Comment detail

コマンドライン引数の取得 (Nested Flatten)

This comment is reply for 5013 sumim: Smalltalk では処理系依存です。...(コマンドライン引数の取得). Go to thread root.

GNU Smalltalk。Cのgetoptっぽい機能が付いてます。

1
2
3
4
5
6
Smalltalk arguments print.
Smalltalk arguments: '-c -d:' do: [:o :n| {o. n} print ]!
"
$ gst 114.st -a a b -c -dFuga
=> ('a' 'b' '-c' '-dFuga' )(nil 'a' )(nil 'b' )($c nil )($d 'Fuga' )
"

Index

Feed

Other

Link

Pathtraq

loading...