Thank you, however I feel that using the
case 'y','Y':
demonstrates another feature that C/C++ doesn't have. I'm aware of those
two functions.
...although in the middle of testing this I realized that "guesses=0"
should have been "guesses=1". Whoops.
On 02/17/2012 08:07 PM, MattCodr wrote:

But is there any guarantee that rdmd will even be on the system? It seems much
safer to me to use dmd, since dmd _will_ be there if you're programming in D,
but rdmd may or may not be there.
- Jonathan M Davis

But is there any guarantee that rdmd will even be on the system? It seems much
safer to me to use dmd, since dmd _will_ be there if you're programming in D,
but rdmd may or may not be there.
- Jonathan M Davis

Aah, whoops. I forgot about dmd -run.
I understand now, sorry and thank you. It would be better to use that. I
was only slightly mixed up with how arguments are split in a shebang
line (on my system, "#!x 1 2 3" is split as "x" "1 2 3" followed by the
name of the file, not "x 1 2 3" as I had thought it had been, nor "x"
"1" "2" "3")
Thank you for explaining your problem.
-Matt Soucy

But is there any guarantee that rdmd will even be on the system? It
seems much
safer to me to use dmd, since dmd _will_ be there if you're
programming in D,
but rdmd may or may not be there.
- Jonathan M Davis

Aah, whoops. I forgot about dmd -run.

I think rdmd can be safely assumed to be alongside dmd. If our
installers don't do that, they're in error.
Andrei

Shouldn't it be dmd and not rdmd in the first line?
- Jonathan M Davis

I chose rdmd because I wanted to demonstrate direct running it directly,
not building it that way.
Out of curiosity, though, is there a specific reason why I should have
used dmd instead? Without switches, that would just build it...
Thank you,
-Matt Soucy

Shouldn't it be dmd and not rdmd in the first line?
- Jonathan M Davis

I chose rdmd because I wanted to demonstrate direct running it directly,
not building it that way.
Out of curiosity, though, is there a specific reason why I should have
used dmd instead? Without switches, that would just build it...

As I understand it, you can run it as a script with #!/bin/dmd, and dmd is
guaranteed to be on your system if you're programming in D whereas rdmd might
not be.
- Jonathan M Davis