Closed jGleitz closed 9 years ago
I thought about this too. An ILIAS question might be good.
Re rules=
: From section B:
Eine Regel ist eine Sequenz der Elemente der Menge {45, 90, 270, 315}, die jeweils durch einen Bindestrich separiert sind.
So I think this set is a set of symbols, not integers.
Yep, that's a good point. I wish they adopted Mr. Worsch's pattern to style symbols differently…
similar to #165, you could argue the same for command parameters!
@kelunik mentioned in #171:
I think that's not something that should error.
+12
is a valid integer.
I'm currently leaning towards the following interpretation:
Allow and explicitly test for leading zeros and +
in all commands and in speedup
, but disallow and explicitly test leading zeros and +
in rule
. My reason for the latter is that rules like +45-+45-+45-+45-00045
look really awkward and presumably weren't intended to be valid.
See Führende Nullen und + on KIT-ILIAS.
Thanks for creating the question. As per the response, this won't be tested by Praktomat, so we shouldn't (re)include it in our tests.
I'm not sure whether we're really allowed to expexct an error message for an
"+"
in the speedup and rule command line argument. Here's why:The task sheet defines the following for the speedup argument:
It depends heavily on what you define as an Integer. But you could argue that they most likely refer to Java's definition of an Integer. And as
Integer#parseInt
accepts tokens like+12
, it's a valid Java-Integer.Regarding the rule, I'm quite sure that
+12
was never meant to be accepted. Butcan be interpreted in two ways:
{"45", "90", "270", "315"}
{45, 90, 270, 315}
In the second interpretation, you could once again argue that
"+45"
means the Java-Integer45
and45 ∈ {45, 90, 270, 315}
.Remember that time when Mr. Worsch warned us to always distinguish between symbols and their meaning? ;)