t***@engmail.uwaterloo.ca
2004-06-11 03:25:38 UTC
Quoting Troy:
"... it's not the quantity of code that's a problem, it's the fact that
you're using an accummulated value (base) to make a decision as to which
state to go to next. You are only allowed to use the current character
of input to make this decision."
This confuses me. The assignment description says that we will need to use
some accumulated ints. Given that the problem is supposed to be done in no
more than 15 states, we will clearly need to use accumulated int(s) during the
reading of the numeral to decide if we must exit due to an invalid digit,
which is more efficient than using only states to decide this anyways. That is
the same kind of decision that Dan was making in his code: using an
accumulated variable to decide if the program should exit due to an error. He
was simply using it for handling errors in the base instead of errors in the
digits. So when you said that that wasn't allowed, did you mean that even
though error checking for the digits must use an accumulated variable, error
checking for the base must use only states? I can't find any other
interpretation of your statement that makes sense.
----------------------------------------
This mail sent through www.mywaterloo.ca
"... it's not the quantity of code that's a problem, it's the fact that
you're using an accummulated value (base) to make a decision as to which
state to go to next. You are only allowed to use the current character
of input to make this decision."
This confuses me. The assignment description says that we will need to use
some accumulated ints. Given that the problem is supposed to be done in no
more than 15 states, we will clearly need to use accumulated int(s) during the
reading of the numeral to decide if we must exit due to an invalid digit,
which is more efficient than using only states to decide this anyways. That is
the same kind of decision that Dan was making in his code: using an
accumulated variable to decide if the program should exit due to an error. He
was simply using it for handling errors in the base instead of errors in the
digits. So when you said that that wasn't allowed, did you mean that even
though error checking for the digits must use an accumulated variable, error
checking for the base must use only states? I can't find any other
interpretation of your statement that makes sense.
----------------------------------------
This mail sent through www.mywaterloo.ca