Hi Tim, > > > > `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.
That's true; it saves the "that's" on each qualifier. It seems the other way has market share though, at least on the source I see. Both are legal, of course. > uint8_t volatile * const tpmsc_rising One favourite thing to apply the `right-left' rule to when explaining this to people is the standard library's signal(3). :-) void (*signal(int, void (*)(int)))(int); In Go, with its left-to-right reading, that's func signal(sig int, handler func(int)) func(int) { ... No `void' required there as functions return nothing unless explicitly stated, e.g. `func foo() uint64 { ...'. Cheers, Ralph. -- 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