You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug +type (+input) is an experimental feature and Javascript and C/C++ don't support them because the interpreters don't disable the echoing.
But these languages could still use +type if the example that uses +type it also uses +pass, discarding the output as a workaround for the echoing problem.
However this not always works and worst, Ruby, which does not have an echoing problem, it is also buggy.
Here are the test cases:
Ruby (it should not require +pass):
>> print"num: ";gets# byexample: +type Does Not Worknum: [42]=>"42\n"
>> gets# byexample: +type It Works[itworks!]=>"it works!\n"
C/C++ (it requires +pass):
?: int n;
?: std::cout << "num: " << std::flush; std::cin >> n; // byexample: +type +pass It Works
num: [42]
?: n
(int) 42
?: std::string what;
?: getline(std::cin, what); // byexample: +type +pass Hungs! A Newline is Missing!
[it works!]
?: what
(std::string &) "it works!"
Describe the bug
+type
(+input
) is an experimental feature and Javascript and C/C++ don't support them because the interpreters don't disable the echoing.But these languages could still use
+type
if the example that uses+type
it also uses+pass
, discarding the output as a workaround for the echoing problem.However this not always works and worst, Ruby, which does not have an echoing problem, it is also buggy.
Here are the test cases:
Ruby (it should not require
+pass
):C/C++ (it requires
+pass
):Javascript (it requires
+pass
):byexample version
byexample 10.1.0
The text was updated successfully, but these errors were encountered: