Skip to content

Conversation

@chrisws
Copy link
Contributor

@chrisws chrisws commented Oct 1, 2014

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.

chrisws added a commit that referenced this pull request Oct 1, 2014
COMMON: map,ref,try/catch,ismap,isref,array,str,array unary operators
@chrisws chrisws merged commit a7ac9bb into smallbasic:master Oct 1, 2014
@chrisws chrisws deleted the 0.11.16 branch October 6, 2014 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant