Re: Io chokes on sample code
gatesphere <[email protected]> Sun, 26 Feb 2012 13:10:01 -0500
| Newsgroups | gmane.comp.lang.io |
|---|---|
| Message-ID | <[email protected]> |
I second this. A lot of time we're just idling, so it's not really a fast-paced thing. -->Jake On 2/26/2012 1:04 PM, Jan-Paul Bultmann wrote: > > You should really check the irc out, > > no worries we can wait on answers ^^ > > Cheers Jan > On Feb 26, 2012, at 6:50 PM, Duke Normandin wrote: > >> On Sun, 26 Feb 2012 10:26:14 -0500 >> gatesphere <[email protected] <mailto:gatesphere%40gmail.com>> wrote: >> >> > Not "always", but whenever you have some statements that you're >> > separating by newlines. When you do that, throw a semicolon in >> > there. >> >> I've also discovered that multiple statements on one line need to >> be separated by a semi-colon in the REPL, as in: >> >> Number factorial := method(n := 1; for(i, 1, self, n = n * i); n) >> >> I tried the above w/o them and got stung! >> >> So, newlines in the REPL notwithstanding, it seems that it's >> there's multiple statements - separate them with a semi-colon. >> >> I've also discovered that the newlines *in a script* serve as >> statement separators. However, again, if the statements are all on >> one line, the semi-colons are required. I gotta learn the hard >> way, it seems. lol ... >> >> > As mentioned on the irc channel yesterday, the Io interpreter >> > translates newlines into semicolons when it reads in scripts, but >> > in the REPL you have to do that manually. >> > >> > You'll get a feel for it eventually. I almost never use >> > semicolons now, but I used to sprinkle everything with them. >> >> It takes some getting used to - but then again, what doesn't! I >> wish that I was a faster keyboarder - I'd join in on IRC.... >> >> Thanks! >> -- >> Duke >> > >