specifications on Variable Length

Hi I'm wondering what's the allowable string length on variables. I'm considering importing XML files or JSON Arrays Trying to figure out what's possible here.
 

420

Active member
The limit for string variables is 500K but it could very well be that your device cannot handle that many;

 

tanutanu

Well-known member
Hi I'm wondering what's the allowable string length on variables. I'm considering importing XML files or JSON Arrays Trying to figure out what's possible here.
MD has no array, so you have to manipulate by yourself. It is a little annoying...
 
Last edited:

tanutanu

Well-known member
Hi I'm wondering what's the allowable string length on variables. I'm considering importing XML files or JSON Arrays Trying to figure out what's possible here.
As a tiny prototyping, I tried to use the JSON compatible data structures in my macro. However, it was not a good option. A simple data structure, i.e. key1:val1, key2:val2, key3:{val3-1, val3-2, val3-3}, is much better than JSON. XML is more redundant. If you can expect the data order, simple linear-array-like-structure is super easier. With the JSON-like-structure, even if searching a specific key, it depends on the code contexts and should be never generic, reusable as is. That's why I don't recommend even if an original data source is web server.

You can also parse them via ParseTask, Autotools and jq command on Termux:Tasker plugin in your macro. However the return values from each method are put into a MD variable as string, and never keep them constantly through the macro execution, just a while running on the single statement. These are gone and you can never manipulate them again unless starting over after getting them from plugins side.
Using a temporary file is an easy option for another language, another platform, but it is not so easy as you know. I think using a notification as a scratchpad is much better when the data size is enough small.
 
Last edited:
Top