Wednesday, October 12, 2011

USL 3.7.5

I have changed the way variables are created so the binary size has been decreased but not too dramatically (~.04MB). I have also added various features to list objects to make them more usable. I also fixed the comments. Previously, comments on the same line would nullify the statement(s) before them. This version allows comments on the same line. The list now has indexes. These indexes can be used to set variable values and vice versa. Lists may also be populated in a new way. I will demonstrate below.

New list demonstration:

##
       animal_list.us

       to execute: usl animal_list.us

       or just type as you see it in the USL shell
##

@animal = "tiger"
list animals

animals = ("elephant",@animal,"chameleon") 
# animals contains: elephant, tiger, chameleon

@animal = animals[0]    # @animal contains: elephant

try
       animals[0] = "shark"
       animals[1] = "whale"
       animals[2] = "dolphin"
       animals[3] = "This will throw an index out of bounds exception."
catch
       say "The index value exceeded the list size."
caught

see animals     # animals contains: shark, whale, dolphin

# eof

I've updated the MediaWiki and you can find it under the "Hosted Apps" tab at the sourceforge link below.

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

No comments:

Post a Comment