Hi Ralph

On 22/01/18 14:04, Ralph Corderoy wrote:
Hi Terry,

  `const char *p' means p is a pointer to a char that's const.


Although it's a bit ugly in this case, I prefer to write this as

char const *p

Then you can read right to left:

p is a pointer to a const char.

This makes life easier when things get more involved. Working on a bunch of definitions at the moment which look like:

uint8_t volatile * const tpmsc_rising

i.e. tpmsc_rising is a constant pointer to a volatile uint8_t.

Cheers


Tim

--
Next meeting:  Bournemouth, Tuesday, 2018-02-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue     / TO THE LIST OR THE AUTHOR

Reply via email to