Discussion:
problem with include_32 executable??
(too old to reply)
THOM BOHK
2011-06-09 01:39:09 UTC
Permalink
I've been using the provided include_32 executable and the regress
script to test my include against the sample executable (which I
assume is meant to work perfectly), and I think I've found a bug:

I deliberately tried something like

#include <"myfile">

to trip my program up as I didn't prepare it to deal with this and it
is illegal since it's supposed to operate on lines of the type

#include[at least one tab/space but could be many]"filename"

right?

anyway include_32 found myfile and included it even though it shouldnt
have? or do I understand the assignment specifications wrong??
Ashif Harji
2011-06-09 03:41:32 UTC
Permalink
You can assume that all include directives are of the form specified in
the assignment. Any #include that is not of this form generates undefined
behaviour and will not be tested. Hence, directives of the form:

#include <filename>

will not be included in our testing.

BTW, using regress with the reference executable to compare with your
solution is excellent.

ashif
Post by THOM BOHK
I've been using the provided include_32 executable and the regress
script to test my include against the sample executable (which I
I deliberately tried something like
#include <"myfile">
to trip my program up as I didn't prepare it to deal with this and it
is illegal since it's supposed to operate on lines of the type
#include[at least one tab/space but could be many]"filename"
right?
anyway include_32 found myfile and included it even though it shouldnt
have? or do I understand the assignment specifications wrong??
Continue reading on narkive:
Loading...