On Thu, Apr 28, 2016 at 5:40 PM, Paul Gilmartin <
[email protected]> wrote:
> This has the collateral boon that you can code an empty 64-bit parameter
> list, something not possible with a 24-bit or 31-bit parameter list.
>
> But IBM should formalize the convention.
>
> I believe it's part of the "C" standard that it should always be possible
> to
> terminate a loop by testing for an address greater than that of any
> possible
> physical object in storage.
>
> And the UNIX argv[] vector is terminated by a NULL (0) pointer, not -1.
>
Uh? What? I am under the distinct impression that the number of elements
in argv[] is the value in argc.
Example transcript:
$ cat bubba.c
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
int main(int argc,char *argv[]) {
char *string=NULL;
char data[]="Now is";
printf("There are %d parameters\n",argc);
printf("%s %s\n",string,data);
return(0);
}
$ gcc -o bubba bubba.c && ./bubba
There are 1 parameters
(null) Now is
>
> -- gil
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>
--
The unfacts, did we have them, are too imprecisely few to warrant our
certitude.
Maranatha! <><
John McKown
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN