diff options
author | Kevin Ryde <user42@zip.com.au> | 2000-05-14 00:30:13 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2000-05-14 00:30:13 +0200 |
commit | d4ad653c5bf9e51324dfcc7dcaa751cdee6104cd (patch) | |
tree | d12565b71e88e64106a0c0f8b829059271d75b0d /INSTALL | |
parent | 5199615b4c70dc3e00aaabd5f5d1676dd7bd1b53 (diff) | |
download | gmp-d4ad653c5bf9e51324dfcc7dcaa751cdee6104cd.tar.gz |
* INSTALL: Better command line argument checking for test progs.
Diffstat (limited to 'INSTALL')
-rw-r--r-- | INSTALL | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -33,8 +33,8 @@ command line, multiplies them, and prints the result to stdout. { mpz_t a, b, p; - /* Expect 2 command line parameters */ - if (argc < 3) exit (1); + if (argc != 3) + { printf ("Usage: %s <number> <number>\n", argv[0]); exit (1); } /* Initialize variables */ mpz_init (a); @@ -73,8 +73,8 @@ MP user: { mpz_t a, b, p; - /* Expect 2 command line parameters */ - if (argc < 3) exit (1); + if (argc != 3) + { printf ("Usage: %s <number> <number>\n", argv[0]); exit (1); } /* Initialize and assign a and b from base 10 strings in argv */ mpz_init_set_str (a, argv[1], 10); |