Command-line MiniScript has been updated to version 1.5 for all three platforms (Windows/Mac/Linux). The Try-It! page has also been updated to version 1.5.
Check out the full release notes here. Changes in version 1.5:
Fixed a bug that would cause assignments of and
and or
expressions to fail under certain circumstances. {#6}
Changed the way scoping works. Previously, if an identifier was not found in the local scope, each calling scope would be searched in turn, all the way back to the global scope. Now those intermediate scopes are skipped; identifiers are located in the local scope, outer scope (in the case of nested functions), or global scope only. {#7}
Added a line continuation feature: if you end a line in an open parenthesis, bracket,
or brace; or a comma; or any binary operator, then you can continue the statement on
the next line. Works in both REPL and script mode. {#8}
When you define a function B locally within a function A, the code of B now has implicit access to the local variables in A. It can also explicitly access them (including assigning new values) via the new outer
special identifier. {#9}
Fixed a bug in the C# version that could cause a NullReferenceException to occur when storing a map that contains null as the key in another map.
Fixed a bug in the C# version that could cause a NullReferenceException to occur when comparing a string to null.
Fixed inconsistencies in number formatting and parsing on certain systems. MiniScript now always converts numbers to strings, and vice versa, in the "invariant" format: using a dot as the decimal separator, and nothing for grouping powers of 1000.
The atan
intrinsic now takes an optional second parameter; the parameters are now named y (default 0) and x (default 1). If x is not specified, this is equivalent to the standard one-parameter atan
function (i.e. existing code is unchanged). But if both parameters are specified, then this returns radians in the correct quadrant, like the atan2
function in many other languages.
Fixed a bug causing spurious errors when running command-line MiniScript with a script file containing non-ASCII characters. {#24}
Fixed a bug with string replication in the C++ version. {#25}
Added the ability to extend basic types (number, string, list, and map) with new methods, that can then be called on values of that type using dot syntax, just like the built-in methods. Known limitation: you can't use dot syntax with number literals.
Lots of good stuff. If you're using MiniScript on the command line, I recommend you upgrade today! (I also recommend you get the Line Commander badge!)