home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 242,653 of 243,242   
   Michael S to ldo@nz.invalid   
   Re: srand(0)   
   31 Dec 25 15:29:09   
   
   From: already5chosen@yahoo.com   
      
   On Wed, 31 Dec 2025 03:10:52 -0000 (UTC)   
   Lawrence D’Oliveiro  wrote:   
      
   > On Wed, 31 Dec 2025 02:01:55 -0000 (UTC), Michael Sanders wrote:   
   >    
   > > *ISO C (C17 / C23)*:   
   > >   
   > > C17, 5.1.2.2.1 "Program startup"   
   > >   
   > > The value of argc shall be nonnegative.   
   > >   
   > > argv[argc] shall be a null pointer.   
   > >   
   > > If the value of argc is greater than zero, the array members argv[0]   
   > > through argv[argc−1] inclusive shall contain pointers to strings   
   > > which are given implementation-defined values.   
   > >   
   > > ...   
   > >   
   > > What say you?     
   >    
   > Clearly on Windows, there are no guarantees about argc contains, so   
   > you shouldn’t be relying on it.   
      
   How did you come to this conclusion?   
   Keith's test appears to show the opposite - he was not able to convince   
   the Windows system to call application with empty argv list.   
   Of course, he tried only one way out of many, but knowing how native   
   Windows system call works, it appears extremely likely that on Windows   
   argc < 1 is impossible.   
      
   https://learn.microsoft.com/en-us/windows/win32/api/processthrea   
   sapi/nf-processthreadsapi-createprocessa   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca