Executing a D script without an [extension in the filename] leads to an error
Jesse Phillips
Jesse.K.Phillips+D at gmail.com
Fri Mar 1 14:50:45 UTC 2019
On Friday, 1 March 2019 at 11:38:51 UTC, BoQsc wrote:
> "And indeed rdmd won't call your script if it doesn't have the
> proper extension."
>
> Then why does Dlang Tour includes shebang: #!/usr/bin/env rdmd
>
> Instead of the one you mentioned, that is fool proof.
> (#!/bin/dmd -run)
>
> Is that an error/mistake in Dlang Tour guide?
You may want to change that too:
#!/bin/dmd -i -run
DMD doesn't automatically compile imported files (at least not
until -i came along), rdmd existed to solve that problem... I
don't know what value it brings with the -i switch existing.
More information about the Digitalmars-d-learn
mailing list