RetroBASIC

Retrogamecoding(.org) => Other Languages => Topic started by: Tomaaz on October 21, 2018, 08:10:03 PM

Title: Icon
Post by: Tomaaz on October 21, 2018, 08:10:03 PM
Has anyone tried Icon? It's been around for a while (41 years), but it doesn't look dated. Last stable release is 5 years old but it's being maintained by people from The University of Arizona. Just a month ago Icon has been re-validated for new version of Ubuntu and MacOS. There is also a Windows version of Icon. It's extremely well documented, comes with a set of libraries and is simple to use. No OOP, just old-school procedural stuff. Website - https://www2.cs.arizona.edu/icon/ .
Title: Re: Icon
Post by: phred on October 27, 2018, 02:34:28 PM
I did try it 20 or so years ago, it was interesting.  It was also expanded by Unicon: https://unicon.sourceforge.io/ (https://unicon.sourceforge.io/) which I played with off and on for a while and even bought the book for although the book was sold during a move.  I always was a sucker for odd languages.
Title: Re: Icon
Post by: Tomaaz on October 30, 2018, 08:43:08 AM
It looks like they don't have else if...
Title: Re: Icon
Post by: phred on October 30, 2018, 02:49:55 PM
Yeah, I see if-then-else but no elseif.
Title: Re: Icon
Post by: ZXDunny on October 30, 2018, 07:16:38 PM
Excuse my ignorance, but what's special about Else If?
Title: Re: Icon
Post by: Tomaaz on October 31, 2018, 10:48:44 AM
It's a part of majority of languages?
Title: Re: Icon
Post by: phred on October 31, 2018, 02:39:40 PM
In this instance probably not much since I do see a case statement, but to me either is cleaner looking than a list of if-then's.
Title: Re: Icon
Post by: ZXDunny on October 31, 2018, 02:58:52 PM
Well as I understand it - and correct me if I'm wrong - but BASIC is generally built (for IF) with IF <condition> THEN <statement> ELSE <statement> and since IF itself constitutes a statement, then IF x THEN y ELSE IF z THEN a etc etc is perfectly fine?
Title: Re: Icon
Post by: Tomaaz on October 31, 2018, 04:22:01 PM
In this instance probably not much since I do see a case statement, but to me either is cleaner looking than a list of if-then's.

Case statement can't replace every else if scenario.

Well as I understand it - and correct me if I'm wrong - but BASIC is generally built (for IF) with IF <condition> THEN <statement> ELSE <statement> and since IF itself constitutes a statement, then IF x THEN y ELSE IF z THEN a etc etc is perfectly fine?

Unless y and a are complex multi-statement blocks.