Talk:Compiler/Simple file inclusion pre processor: Difference between revisions
Content added Content deleted
(Two preprocessor tasks) |
|||
Line 40: | Line 40: | ||
:::Also, I doubt that a C pre-processor written in anything but C would get much use for anything other than bootstrapping... --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 21:42, 6 June 2021 (UTC) |
:::Also, I doubt that a C pre-processor written in anything but C would get much use for anything other than bootstrapping... --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 21:42, 6 June 2021 (UTC) |
||
I believe our sample language could use one line: #include "file" and #define call value. Usage could be: |
I believe our sample language could use one line: #include "file" and #define call value. Usage could be: |
||
~~ Header.h ~~ |
~~ Header.h ~~ |
||
#define area(h, w) h*w |
#define area(h, w) h*w |
||
Line 50: | Line 51: | ||
yielding code output of: |
yielding code output of: |
||
area = 6*5; |
area = 6*5; |
||
Or: |
Or: |
||
/* Include Header.h */ |
/* Include Header.h */ |
||
/* Define area(h, w) as h*w */ |
/* Define area(h, w) as h*w */ |