Thank you for the response and I can understand leaving it out of Phobos. I'd like to claim that it is similar in manner to getopt, but there is actually a standard for passing parameters to a program so...<br><br><div class="gmail_quote">
On Tue, Sep 14, 2010 at 7:29 AM, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:andrei@erdani.com">andrei@erdani.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I think that's useful functionality, but it doesn't strike me as an API belonging to the standard library.<br>
<br>
Andrei<div><div></div><div class="h5"><br>
<br>
On 09/11/2010 04:41 PM, Jesse Phillips wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">
There was a newsgroup post on this subject the beginning of this month<br>
and it didn't get much feedback, other than a couple "sounds good to<br>
me"<br>
<br>
<a href="http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=115470" target="_blank">http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=115470</a><br>
<br>
I offered to clean up my implementation. There are some things I need<br>
to experiment with and choose what would be best. And most importantly<br>
I need to find out if it would be considered a good addition to<br>
Phobos. The below code is an example of the functions and their usage:<br>
<br>
import std.interact;<br>
<br>
void main() {<br>
auto age = userInput!int("Please Enter you age");<br>
<br>
if(userInput!bool("Do you want to continue?"))<br>
{<br>
auto outputFolder = pathLocation("Where you do want to place<br>
the output?");<br>
auto color = menu!string("What color would you like to use?",<br>
["Blue", "Green"]);<br>
}<br>
<br>
auto num = require!(int, "a> 0&& a<= 10")("Enter a number from 1 to 10");<br>
}<br>
<br>
Opinions?<br>
<br>
<br>
<br>
<br>
<br></div></div>
_______________________________________________<br>
phobos mailing list<br>
<a href="mailto:phobos@puremagic.com" target="_blank">phobos@puremagic.com</a><br>
<a href="http://lists.puremagic.com/mailman/listinfo/phobos" target="_blank">http://lists.puremagic.com/mailman/listinfo/phobos</a><br>
</blockquote>
_______________________________________________<br>
phobos mailing list<br>
<a href="mailto:phobos@puremagic.com" target="_blank">phobos@puremagic.com</a><br>
<a href="http://lists.puremagic.com/mailman/listinfo/phobos" target="_blank">http://lists.puremagic.com/mailman/listinfo/phobos</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Liberty means responsibility. That is why most men dread it.<br> - George Bernard Shaw<br>