digitalmars.D.learn - Why can't the DMD compiler accept files or directories with white
On Saturday, 4 September 2021 at 23:50:33 UTC, Marcone wrote:Example: dmd "hello world.d"``` $ cat hello\ world.d module helloworld; void main() { import std.stdio : writeln; writeln("without the explicit 'module', this file would"); writeln("be inferred to have an invalid module name."); } $ dmd 'hello world.d' $ ./hello\ world without the explicit 'module', this file would be inferred to have an invalid module name. $ sed -i 1d hello\ world.d $ dmd 'hello world.d' hello world.d: Error: module `hello world` has non-identifier characters in filename, use module declaration instead ```
Sep 04 2021
On Sunday, 5 September 2021 at 00:00:33 UTC, jfondren wrote:On Saturday, 4 September 2021 at 23:50:33 UTC, Marcone wrote:Very Good! Now work fine.Example: dmd "hello world.d"``` $ cat hello\ world.d module helloworld; void main() { import std.stdio : writeln; writeln("without the explicit 'module', this file would"); writeln("be inferred to have an invalid module name."); } $ dmd 'hello world.d' $ ./hello\ world without the explicit 'module', this file would be inferred to have an invalid module name. $ sed -i 1d hello\ world.d $ dmd 'hello world.d' hello world.d: Error: module `hello world` has non-identifier characters in filename, use module declaration instead ```
Sep 04 2021