-
Notifications
You must be signed in to change notification settings - Fork 11
Conversation
timoti111
commented
Nov 21, 2017
•
edited
Loading
edited
- when section had global extension need in tests.json and test was in file and was not defined in tests.json test was not skipped
- asc() test can now be run without FUNEXP extension
- chr() test can now be run without FUNEXP extension
- tests 09/04 and 09/14 need IFTHEN extension
- when section had global extension need in tests.json and test was in file and was not defined in tests.json test was not skipped
@@ -14,13 +14,13 @@ | |||
}, | |||
{ | |||
"info": "Asc value", | |||
"stdout": " 104", | |||
"code": "scope \n print asc(!\"ahoj\", 2); \n end scope" | |||
"stdout": " 111", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Není pravda, zadej si na https://www.jdoodle.com/execute-freebasic-online
/' Zajisteni zakladni kompatibility IFJ17->FreeBASIC '/
Function Length(s As String) As Integer
Return Len(s)
End Function
Function SubStr(s as String, i As Integer, n As Integer) As String
Return Mid(s, i, n)
End Function
/' Zde bude nasledovat program jazyka IFJ17 '/
scope
print asc (!"ahoj", 2);
end scope
Výstup bude 104
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bral som to zo zadania tak že druhý parameter znamená index v poli charov ale je pravda že v tomto prípade to dáva oveľa väčší zmysel keď je to brané ako pozícia v stringu. Opravené.
"stdout": " 104", | ||
"code": "scope \n print asc(!\"ahoj\", 2); \n end scope" | ||
"stdout": " 111", | ||
"code": "scope \n dim a as integer = asc(!\"ahoj\", 2) \n print a; \n end scope" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Není v základním zadání volání funkce povoleno pouze jako id = funkce(seznam_parametrů) ?
Ano moje zadání neodpovídalo ale řekl bych že tvé také ne. Mohu se mýlit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Souhlas s @martinkobelka, musí tam být samostatné přiřazení.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Áno to je pravda. Opravené.
}, | ||
{ | ||
"info": "Chr function", | ||
"stdout": "a", | ||
"code": "scope \n print chr(97); \n end scope" | ||
"code": "scope \n dim s as string = chr(97) \n print s; \n end scope" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stejný problém jako výše?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opravené.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zatím nemohu vzít, některá očekávání v testech jsou chybná, viz komentáře.
0e4a317
to
05fd086
Compare
- removed need of FUNEXP extension on asc() and chr() tests - tests 05/04 and 05/14 needs IFTHEN extension
Díky @timoti111. |