Welcome to D REPL.
D> import std;
std
D> real times_pi(real n) {
| return n * PI;
| }
times_pi
D> times_pi(3)
9.42478
But this heathen, disgusting input is refused:
Welcome to D REPL.
D> import std;
std
D> real times_pi(real n)
core.exception.RangeError@../../.dub/packages/libdparse-0.8.7/libdparse/src/dparse/parser.d(7511): Range violation
... more errors ...
I approve of this restriction, of course, but as drepl itself follows dstyle's brace recommendations, I think it may be an unintentional one.
In drepl 0.2.1, this input is accepted:
But this heathen, disgusting input is refused:
I approve of this restriction, of course, but as drepl itself follows dstyle's brace recommendations, I think it may be an unintentional one.