Ok so I couldn’t post on reddit due not having enough “karmas” so I am going to dump that whole ideas for XenText thing here:
Easy to implement, might be harder for C++: Create a dictionary/map to store the variables. To store a variable set the key as a string of the variable number and serialize the variable content. Now to access the variable get the variable data by the variable name as a key then deserialize it and perform whatever actions the user wants to do.
Harder to implement, better for all languages because SQLite is written in C++ or C I think: Assuming you’ve already created a table, create two columns mainly for key and value. Then follow the steps above except instead of setting the key and value of a map you set the values of the key and value columns. To retrieve a variable use the select command in SQL.
When nothing is running the call stack is empty. If a function is invoked the current variables are saved and thrown onto an item on the call stack. Then we reinitalize the variables system with the parameters/arguments sent to the function.
This applies only if you don’t want the variables outside a function to transfer.
I have more ideas but I’m still thinking of how to put them in text. Also can we make a flair for suggestions?
Also I’m pretty cool with java. I can also read java. By the way, it’s less hard to make mistakes in java for me in my experience.