[sac-user] SAC and argc/argv

Andrew Pennebaker andrew.pennebaker at gmail.com
Thu Oct 27 02:07:24 CEST 2011

Why does argv() in the CommandLine module return a string? That's actually
less helpful than just providing C's built-in argv variable, because you
have to explicitly import the functionality.

$ cat args.sac
use StdIO: all;
use Array: all;
use CommandLine: all;

int main() {
    printf("%s\n", argv());

$ sac2c -o args args.sac
$ ./args a b c
./args a b c

Why not have argv() return a SAC array of strings? That would be A) helpful
and B) the idiomatic thing for SAC to do with command line arguments.


Andrew Pennebaker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sac-home.org/pipermail/sac-user/attachments/20111026/b2b9963d/attachment-0002.html>

More information about the sac-user mailing list