<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">In the terminal you enter all the args with colon separators. In your example, you'd do:&nbsp;%&gt; chuck fooprint.ck:25<div><br><div><div>Within your code, use me.args() to get the arg count, and me.arg(i) to get each arg (starting at i=0).&nbsp;</div><div><br></div><div>(BTW, somewhere in the documentations it says to use me.numArgs() to get the arg cnt, but that doesn't seem to work.)</div><div><div><br></div></div><div><br><div><div>On Sep 18, 2014, at 3:29 PM, Philipp Blume wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">I'd like to call a .ck program from the Mac OSX Terminal command line, and feed values to variables in the given program.<div><br></div><div>For example, here's my program '<a href="http://fooprint.ck/">fooprint.ck</a>':<br><br>=begin program</div><div><br></div><div>&lt;&lt;&lt; foo &gt;&gt;&gt; ;</div><div><br></div><div>=end program</div><div><br></div><div>So on the command line I'd like to write</div><div><br></div><div>&amp;&gt; chuck <a href="http://fooprint.ck/">fooprint.ck</a> --foo=25</div><div><br></div><div>or whatever.<br><br>What do I add to the program, and/or what do I add to the command to make this happen?</div><div><div><br></div>-- <br>Philipp Blume<br>
</div></div>
_______________________________________________<br>chuck-users mailing list<br><a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>https://lists.cs.princeton.edu/mailman/listinfo/chuck-users<br></blockquote></div><br></div></div></div></body></html>