Search code examples
command-lineargumentssmalltalkargvgnu-smalltalk

get number of arguments from command line (smalltalk)


Hello im new to smalltalk and was wondering how to get number of arguments passed through the command line. Sorry this is such a basic question.


Solution

  • There's GetOpt.st file that probably does what you want. It was written for gnu smalltalk 3.2.5 and is located at http://fossies.org/linux/smalltalk/kernel/Getopt.st.

    There's also a copy at http://github.com/bonzini/smalltalk/blob/master/kernel/Getopt.st

    It may or may not be included in the base image. I haven't used gnu smalltalk in about 6 years.