smallbasic/SmallBASIC — pull request #20 by chrisws (2014-10-01 12:14:06+00:00)
Title: COMMON: map,ref,try/catch,ismap,isref,array,str,array unary operators

The MAP variable type combines the features of previously separate "User Defined Structures" and "Associated Array" variables. The MAP provides value-key pair access along with array or dotted notation. The MAP can be initialized from a String variable using the ARRAY command. The ARRAY command supports JSON (Javascript object notation) syntax.

The MAP can be converted back into a JSON string using the STR command. You can test whether a variable is a MAP using the ISMAP command.

The REF variable type is a "reference" to another variable (like a pointer in c). You create a reference by assigning a variable with the BYREF keyword (or @ symbol). For example LET c = @ b. You can test whether a variable is a reference using the ISREF command.

The IMGW and IMGH commands have been replaced with the single IMAGE command. IMAGE takes a file pointer and returns a system object allowing full control of the image placement. Note: In this release only the language aspect has been implemented. This feature will be completed in the next build.

It is now possible to use unary-operators on array elements, for example a(0)++.

Handling of round brackets with FUNC calls has been fixed.