Please enable JavaScript to view this site.

A-Shell Development History

Language runtime refinement: when an assignment is made to a substring (aka slice) of a dynamic variable, the variable is now expanded as needed for the referenced slice to be part of the variable. For example:

map1 var,x,0

var[9;3] = "foo"

print var[9;3]

 

Previously, the print statement would have printed nothing; the assignment statement would have had no effect, since the variable var was not long enough for the [9;3] slice to be applicable.

Now, it will be expanded, with leading bytes filled with spaces for string type variables or nulls for X type variables, so that the print statement will always display "foo".

This brings the behavior more into line with the expectation for dynamic variables, which are normally expanded as needed during assignment statements. But the slice assignment has always been a very special case.