vCalc has added the ability to return multiple results in an equation. This feature greatly increases the versatility of our equations and opens up many possibilities for content creators.
The use of multiline results is very simple. Instead of returning a single result you have the option to return a list of results. These results can be annotated to make it clear to the user what each result is referring to.
To use multiline results in your equation first create an empty list to hold your results:
def resultList = [ ]
Then each result can be added to this list like this:
def myResult = 5
resultList << myResult
If you would like to add an annotation to a result you put it in a sublist where the first element is the string annotation and then add that to the main result list. You can add an annotation to some or all results:
resultList << ["This is my annotation string", myResult]
To see multiline results in action check out the Taco Bar Calculator