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,342 of 243,242   
   Lynn McGuire to Philipp Klaus Krause   
   Re: What is the meaning of array paramet   
   05 Dec 25 15:36:18   
   
   From: lynnmcguire5@gmail.com   
      
   On 11/25/2025 7:28 AM, Philipp Klaus Krause wrote:   
   > Since C99 we have four types of array parameters:   
   >   
   > []   
   > [assignment-expression]   
   > [static assignment-expression]   
   > [*]   
   >   
   > But what is their meaning? They're all compatible, they all decay to   
   > pointers anyway. Only to [static assignment-expression] does the   
   > standard give a little bit of extra formal meaning, by making it UB when   
   > a too-short array is passed.   
   >   
   > They exist, they are different types, but the standard does not give   
   > them meaning (with the exception noted above). So people using them must   
   > have a motivation beyond what is explicitly stated in the standard, and   
   > thus an idea of what the meaning of these would or should be.   
   >   
   > Philipp   
      
   To tell the code reader and the software debugger what the size of the   
   array probably is.  Fortran does the same thing.   
      
   It is incredibly useful for debugging.   
      
   Lynn   
      
   --- 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