"Fossies" - the Fresh Open Source Software Archive

Member "ponyc-0.33.0/examples/printargs/printargs.pony" (1 Nov 2019, 316 Bytes) of package /linux/misc/ponyc-0.33.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Pony source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 use "cli"
    2 
    3 actor Main
    4   new create(env: Env) =>
    5     var str = recover String end
    6 
    7     for s in env.args.values() do
    8       str.append(s)
    9       str.append(" ")
   10     end
   11 
   12     env.out.print(consume str)
   13 
   14     let envvars = EnvVars(env.vars)
   15 
   16     for (k, v) in envvars.pairs() do
   17       env.out.print(k + " = " + v)
   18     end