- Magic numbers
- Constants with a specific meaning should be clearly named
- Possible exceptions include:
0
,1
and2
where usage is unambiguous- arguably the shift and mask values when doing bitshifting and masking
- Single-letter variables names
- With the possible exceptions of:
x
andy
for coordinates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:100000000C948E030C94B6030C94B6030C94B603B4 | |
:100010000C94B6030C94B6030C94B6030C94B6037C | |
:100020000C94B6030C94B6030C9475070C94E40777 | |
:100030000C94B6030C94B6030C94B6030C94B6035C | |
:100040000C94B6030C94B6030C94B6030C94B6034C | |
:100050000C94B6030C94B6030C94B6030C94160AD5 | |
:100060000C94B6030C94B6030C94B6030C94B6032C | |
:100070000C94B6030C94B6030C94B6030C94B6031C | |
:100080000C94B6030C94B6030C94B6030C94B6030C | |
:100090000C94B6030C94B6030C94B6030C94B603FC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Cthulhu | |
{ | |
template< typename T > | |
void fhtagn(T & object) | |
{ | |
// ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn! | |
ph_nglui(object); | |
mglw_nafh(object); | |
R_lyeh(object); | |
wgah_nagl(object); |
Copyright © 2020 Pharap Licensed as CC BY-SA 4.0 (Human Readable Version).
| Combo | Function |
The C++ build process is roughly as thus:
- All .cpp (and possibly .c) files are compiled:
- First the preprocessor processes the file, it (as required):
- Parses and processes all
#define
d macros, storing their definitions in a symbol table (a string to string dictionary). - Parses and processes all
#if
,#elif
and#endif
macros, thus performing conditional compilation. - Parses and processes all
#include
d header (.h
) files, which includes inserting the contents of the header file into the point at which it was #included (or performs a process that achieves the equivalent effect). - Parses and processes all
#pragma
s, implementing their compiler-specific behaviour.- Note that the most common and widely supported
#pragma
is#pragma once
, which acts as an alternative to include guards.
- Note that the most common and widely supported
- Parses and processes all
- First the preprocessor processes the file, it (as required):
- Other
#pragma
examples include#pragma omp
, which implements 'Open Multi-Processing'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduboy2.h> | |
Arduboy2 arduboy; | |
// This code is under the CC0 licence | |
// and hence is in the public domain, | |
// or your local equivalent. | |
void setup() | |
{ |
リンク:
- http://neri5.hatenablog.com/entry/2017/10/24/180000
- https://japanese.engadget.com/jp-2015-05-12-8bit-arduboy-usb-arduino.html
- https://netafull.net/gadget/050109.html
- https://akiba-pc.watch.impress.co.jp/docs/wakiba/find/1039056.html
- https://omocoro.jp/bros/kiji/200112/
- https://daily-gadget.net/2019/07/08/post-5046/
- http://techwave.jp/archives/arduboy-24247.html
- https://nlab.itmedia.co.jp/nl/articles/1505/13/news170.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduboy2.h> | |
Arduboy2 arduboy; | |
void setup() | |
{ | |
arduboy.begin(); | |
} | |
void loop() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.jeremydorn.com/json-editor?schema=N4IgJAzgxgFgpgWwIYgFwhgF0wB1QenwCsIB7AOwFpp5kA6UgJwHN8ATRpAM00oAYALPhqIkAYhAAaEJgCeOOGhCkARkThRMUmQEtMAG0Xod5LqTokKAAhNR9AVzZw2N8laRW6SRm3srSslZcOobaTtCMOjiYOhRKAMIUmHDkmBBWpFxWmPCuZhZkbsGGrnaOzq7unt6+/oHFcJJW9hAVKoHI5EjMcIzu5C76pEhOfTiMpMycCOmYpM04QyPVPn4BQSFws/NIbgCCq3VWzEgIJsxWELIQyQh02uOkCowxW2igIsgAar0QseTvGTyIwgEzJHqMMJwLhIez6LSoABM0jO5B0CHsCDQyJAyAAHujMdjpDEDCCAMqwURWABuv3+UIiURicXQABVcp8PHTGH9rAB3GA6WDZXImfKWNxQUgIRY6LZWfl6GB0KwcnTpLk2dI8vluREgAC+JL0oVQoDkCiUN0i5GY2lRABkUswcmgAIwmslKNmmxTScJQSLRBnoPbZP1BJhWOA82Q5c5WaWpJAmCpKhNuBPpLyHdYNe7GkCB4MsgHmoFW9A287aUlmkAAES2QeZDIDLdLoZA4ZLbesmSjfVjvXjQrtSaSqfI6eVJlFGpWtXzm0L0lhOSYgMtIJrdodJmddrdqE9um9Yfsm8hHaZIdZIA5cHcV5g0cHOWfuccRwLVgAsnCMSLM+G5vrySa7FYKjPl0CAVPOn6XKcz57swa4gLqoYWsC1qYLa9oooeLonme9Ygj8vLtsWnb9uWj65IwcCGEgrS0vSA5ZNmS5rPUq5GgGSDJNuuHVvhtbruQsgAPJcGgADaoBmIwyAIsWQmKMaSlMKpShsBplAxPBRoALpeg2jYaf0LhGf6NF3mWPq5PpyTWVYAAUTxlkg+gAJQRvBGRZExLGtE084AJLktJVgABwAGx8O6Q6qaqACidDoVYiJJQA7PwiKUIiADMGR9Dl7r5XwhUl |
OlderNewer