Wednesday, November 2, 2011

USL 3.8.0

Seven changes have been made in this release. The seventh being the most important. Allow me to explain each change individually.

1. Object instances are now implicitly removed when created in methods.
object o
       method m;say "Hello, World!";end
end

method m
       oo = o       # oo will be removed after leaving this method
       oo.m
end

2. Object variables may now be public or private members.
object o
       public
              @var = "Hello, World!"

              method m
                     say self.@var
              end
end

oo = o
oo.m

3. Errors return the actual line where the error occurred. (It returns the actual code that threw the error.)

4. Fixed the bug in say when printing the value of just an object variable. (Refer to example 2.)

5. Fixed the self keyword. self used to be limited to only executing object methods and returning their values with interpolation.

6. Interpreter and script arguments are now retrieved with indices.
first_arg = args[0]

7. USL now implicitly creates temporary variables from method parameters.
method generic_add(a,b)
       return (@a+@b)
end

@str = generic_add("abc","def")
@num = generic_add(250,6)
To download 3.8.0, you can visit any of the following links:
sourceforge
freecode

2 comments:

  1. you know what? you are my hero for doing this. you just made me stand up and begin to work again after seeing that there are more among me out there which aren't programming for 20 years and still learning.

    i began 2008, with c#, but wandered down to avr assembler on 8bit microprocessors now. it is time to build a new board and start over again.

    thank you. just thank you <3

    ReplyDelete
  2. No problem. That's impressive that you program in assembler. I am going to learn soon so I can write a compiler for USL. I'm glad to be one of your heroes, kind anon.

    ReplyDelete