mc-Things

General Category => New Version Releases => Topic started by: mc-Abe on June 17, 2016, 08:52:02 pm

Title: mc-Studio v0.7-893
Post by: mc-Abe on June 17, 2016, 08:52:02 pm
We have a new version of mc-Studio that supports Select Case statements. This has the same functionality as the switch statement in Java or C#. To make this efficient we also had to combine literals during compile time so you can specify something like "case 1<<8". The case does not fall through like the other languages to prevent errors. This will be solved by multiple cases in one line like "Case 1, 4, 8" but hasn't been implemented yet but will come in one of the next versions.
 
We now also have fixed a lot of Enum bugs. Enums are ideal to make your code readable. Enums inherit from a byte, short or integer and can be freely copied to those data types. It is not possible to cast bytes, short or integers to Enums, because we don't currently have a way to check if they are valid. Something for a later version.
 
My favourite statement is "For Each" which is available since version 890. This statement is very effective to iterate through a list or string. See the example in the mc-Script user guide section 5.3.1. Combined with the power of the Clone() method it allows you to delete items out of the list while iterating through that list.
 
For a complete update see the release notes