I don't want to use any of the usual things like JSON, XML etc because this has got to be extremely light weight as it's going to be embedded
That's fine. I still encourage you to structure your lightweight script file into (unit-testable) subroutines at the top of the file, with each subroutine having well-defined inputs and outputs and not relying on global data ... followed by a short mainline at the end.
A simple example of this approach can be found in this node.
👁️🍾👍🦟
In reply to Re^3: Reading into array with sscanf
by eyepopslikeamosquito
in thread Reading into array with sscanf
by colintu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |