On Thu, 28 Apr 2016 14:23:14 -0700, Ed Jaffe wrote:

>On 4/27/2016 8:25 PM, Phil Smith III wrote:
>> How does a 64-bit caller indicate the end of a variable parameter list?
>
>We tend to use FFFFFFFF_FFFFFFFF as the end of list indicator. Yes, I
>realize it's _technically_ a valid 64-bit address, but it's extremely
>unlikely -- nee impossible -- that we would ever want to place a valid
>parameter at that particular byte location in virtual storage. And, who
>knows, maybe one day the z/OS guys will decide to make that last (1M or
>2G) page guaranteed invalid like they do with the 4K page at 7FFFF000...
> 
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.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to