As a C/C++ convert, I like 0_0 (NULL in C lingo) better than FFFFFFFF_FFFFFFFF (only because it is a widely-used convention in C). (OTOH FFF... is widely-used in CMS.)
Agree with Gil's "collateral boon." IBM should definitely standardize *something*, before we have 27 competing "standards" out there. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Paul Gilmartin Sent: Thursday, April 28, 2016 3:41 PM To: [email protected] Subject: Re: 64-bit caller and VL-bit 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. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
