User Tools

Site Tools


c_language:overview

This is an old revision of the document!


Things i should read up on

Right-to-left rule

To decode the expression char (*(*x())[5])()

         x          : x is a
         x()        : function
        *x()        : returning pointer to
       (*x())[5]    : a 5-element array of 
      *(*x())[5]    : pointer to
     (*(*x())[5])() : function
char (*(*x())[5])() : returning char

Const

uint8_t const *foo; // Points at constant. Can't change the value that foo points at.
const uint8_t *foo; // Same as above.
uint8_t *const foo; // Constant pointer. Can't change the address it is holding.

Snippets

Debug macro

#define STRINGIFY_(X) #X
#define STRINGIFY(X) STRINGIFY_(X)
#define PING() debug_print_str(__FILE__ " : " STRINGIFY(__LINE__) "\n")
c_language/overview.1614604352.txt.gz · Last modified: 2022/09/12 00:30 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki