Created
March 7, 2023 21:36
-
-
Save LukeGary462/c47771f6d496926f0fc6206d85977ca5 to your computer and use it in GitHub Desktop.
c trigraph support
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 <stdio.h> | |
| #include <stdint.h> | |
| /** This is fun... | |
| * Trigraph Replaces | |
| * | |
| * ??( [ | |
| * ??) ] | |
| * ??< { | |
| * ??> } | |
| * ??/ \ | |
| * ??' ^ | |
| * ??= # | |
| * ??! | | |
| * ??- ~ | |
| * | |
| */ | |
| int main(void){ | |
| uint8_t myByte = 0x00; | |
| uint8_t newValue = myByte??!1<<2; | |
| printf("old: 0x%02X, new: 0x%02X\n", myByte, newValue); | |
| myByte = newValue; | |
| newValue&=??-(1<<2); | |
| printf("old: 0x%02X, new: 0x%02X", myByte, newValue); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment