Input handling? (newbie alert!)

Cavalary cavalary1684 at hotmail.com
Sun Sep 12 04:18:01 PDT 2010


Yeah, one of the reasons why it made sense to me I guess, as the
term's "informatica" in Romanian, so the mental link was instant
even if I probably never heard it used in English before.

A programming language that doesn't put effort into teaching
people how to use it isn't exactly likely to end up with a
significant userbase, don't you think? (As for D1, from my 1
attempt to compile my "toy" into it I know it can't handle
my "hybrid" use of foreach (just how it made sense to me when
porting from Ruby... and since it worked in D2, great).)
But yeah, starting to poke around through the Phobos docs and even
the files (when I looked for random number generators, when the
compiler announced that rand was deprecated, and also for the
rounding functions... "Hm? Undefined? If I were a rounding
function, where would I be? ... Math? Let's see what's in there
then.")

readln seems to do well enough for input for the moment. I'll be
looking into file I/O later.
Just put in my first working try-catch last night too. (After
scratching my head a lot because from the example I was given I
assumed catch needed a random parameter, though I didn't
understand why. Then the compiler errors made me try with no
parameter (as in catch()), variable types, the word "class",
either alone or followed by various things (since it said it only
accepted classes)... Eventually found a post in the learn archives
that said that if you want catch-all you just put in catch with no
parentheses and went duh!)

About seriousness... At the moment I don't even know if I'll still
have it installed next week. And I'll need to be REALLY serious
about something to shell out $40 on a book about it! And there's
also the matter of availability over here (though Andrei's name
says he was most likely at least born here).


More information about the Digitalmars-d-learn mailing list