www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Why can't the DMD compiler accept files or directories with white

reply Marcone <marcone email.com> writes:
Example:

dmd "hello world.d"
Sep 04 2021
parent reply jfondren <julian.fondren gmail.com> writes:
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
parent Marcone <marcone email.com> writes:
On Sunday, 5 September 2021 at 00:00:33 UTC, jfondren wrote:
 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 ```
Very Good! Now work fine.
Sep 04 2021