Subject:
|
Having trouble with -D option
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Thu, 10 Feb 2000 23:13:43 GMT
|
Viewed:
|
1877 times
|
| |
| |
If I compile this program (named d.nqc):
/* nqc program */
#if (D == 1)
task main() {}
#endif
with the command:
nqc -DD=1 d.nqc
I get the following error:
# Error: syntax error in expression
File "d.nqc" ; line 2
# #if (D == 1)
# ^
#----------------------------------------------------------
# 1 error during compilation
But change the program to this:
/* nqc program */
#define D 1
#if (D == 1)
task main() {}
#endif
and it works fine ... what am I missing?
I'm using "nqc version 2.0.1 (built Oct 5 1999, 16:51:16)"
from the CD that came with the book. Nice book, BTW.
|
|
Message has 2 Replies: | | Re: Having trouble with -D option
|
| You found a bug - NQC is actually defining D to be the tokens =1, which then leads to a lot of confusion later on. Basically I bungled the pointer math. I fixed the source so the next release (2.1 final) should be fine. I'll probably release 2.1 in (...) (25 years ago, 11-Feb-00, to lugnet.robotics.rcx.nqc)
|
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|