Add second arg to main() in 1998/fanf
As it is mostly just the C pre-processor I added a macro that is part of main()'s args.
This commit is contained in:
1 parent
fd2849c8e5
commit
2c37f1fd7e
2 files changed
+9
-1
No files matched your search
+2
-1
@@ -1,6 +1,7 @@
|
||||
|
||||
#define i int
|
||||
#define n struct n
|
||||
#define T , char **C) { return (
|
||||
#define x ){ return (
|
||||
#define A ->
|
||||
#define N n*
|
||||
@@ -56,7 +57,7 @@ i j k c ? O U r u U U X : y b k y d k y
|
||||
#define b(b) ( ( b a d
|
||||
#define E(E) b ( M E u X )
|
||||
|
||||
main k i ) ! (
|
||||
main ( i c T
|
||||
|
||||
#define I b ( m I u X )
|
||||
#define J b ( m J u X )
|
||||
|
||||
@@ -2062,6 +2062,13 @@ final code that is compiled. The code is now what it essentially becomes when
|
||||
processed completely. The intermediate steps can now be performed to see how it
|
||||
expands but it can still compile and be used.
|
||||
|
||||
Cody also added a second arg to `main()` out of an abundance of caution as some
|
||||
versions of clang whine about the number of args to `main()`. These versions
|
||||
claim that only 0, 2 or 3 are allowed but it does allow 1 anyway. It is quite
|
||||
possible though that this will change so it is fixed in case this happens. As it
|
||||
is mostly just through the C pre-processor Cody added a new macro to do
|
||||
translate to the rest of `main()`'s args.
|
||||
|
||||
Cody also added the [try.sh](1998/fanf/try.sh) script to show the output of some
|
||||
of the expressions that we selected.
|
||||
|
||||
|
||||
Reference in new issue
Block a user