So in that article I suppose Dan Saks is talking about function signatures,
in C++ versus C. The explanations seem very contrived, and I'm not sure I'd
consider much of the discussed code "good form"

*On the other hand, in:*
> *int f(char *const p);*
> *the const qualifier is at the top level, so*
> *it is not part of the function’s signa-*
> *ture. This function has the same sig-*
> *nature as:*
> *int f(char *p);*


This "form" or style of code is bad going by anything I've read. So . . .

inf f(const char *p) or *maybe* int f(char const *p). But unless I
misunderstood what Dan Saks is trying to say here. The article heading
should have been "Asterisk placement", and not top-level CV-qualifiers. Or
maybe the point is still valid, but could have been avoided entirely by
using "better" coding style. *shrug*

On Mon, Aug 24, 2015 at 6:25 PM, Andrew P. Lentvorski <[email protected]>
wrote:

> On Monday, August 24, 2015 at 5:10:11 PM UTC-7, William Hermans wrote:
>>
>> I think the actual scope matters more. e.g. global versus local scope.
>> But maybe I'm remembering wrongly as I recall reading something to this
>> effect years ago. Anyway, I find this link the best single resource for
>> explaining what volatile *is* - And . . I'm not trying to start an argument
>> or anything, I just like discussing programming in general.
>>
>> http://www.barrgroup.com/Embedded-Systems/How-To/C-Volatile-Keyword
>>
>
> Um, that article is in violent agreement with me.  :)
>
> Incidentally, for a great explanation of why you have a choice of where to
>> place volatile and why you should place it after the data type (for
>> example, int volatile * foo), read Dan Sak's column "Top-Level
>> cv-Qualifiers in Function Parameters" (Embedded Systems Programming,
>> February 2000, p. 63).
>>
>
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to