Monday, November 21, 2011

USL 3.8.4

I have added curly-brace blocks for method, while, and switch. The end keyword is still available to those who dislike curly-braced code-blocks. I fixed the null value. Apparently null variables could be set as strings but not as numbers. This issue has been resolved. I have also fixed tons of issues in the Mac binary. Why is C++ in Linux not compatible with OS X? Both are POSIX and should compile with basically no auditing. Thankfully I only needed to fix a few lines in one file instead of every other line throughout the entire set. Here are some examples of the curly-brace blocks and a reintroduction to the null keyword.

Curly-Brace Code-Blocks:
method __
{
       @var = "Value"
       switch @var
       {
              case "value"
                     say "This will not be seen."
              case "Value"
                     say "Curly-Brace Example."
       }
}

__

Reintroduction to null in USL:

For those who did not already know, null removes the type and value of a variable. It allows a variable to change its "type."

Example:
@str = "a string."    # @str is now a string.
@str = 3.14159        # @str is still a string.
@str = null           # @str is no longer a string.
redefine @str @num    # changing the identifier of @str to @num.
@num = 3.14159        # @num is now a number.
@num = null           # @num is no longer a number.
@num = "a string."    # @num is now a string.
remove @num           # @num is no longer a variable.

To download 3.8.4, you can visit any of the following links:
freecode

No comments:

Post a Comment