Support Board
Date/Time: Mon, 12 May 2025 22:57:08 +0000
Post From: ACSIL storage of a strings list/array
[2016-03-15 23:07:09] |
User553714 - Posts: 184 |
Hi, I am aware that you can declare global variables of string/char arrays as part of a DLL but I was wondering if you can do this locally within a function in a persistent manner? I don't believe you can do this with persistent variables as a array/string/char type don't exist? I am trying to store a list of symbols (i.e. a watchlist) locally within a function which don't get overwritten or changed when a function returns. I considered using a "sc.StorageBlock" but this only allows for 512 bytes and longer watchlists will exceed this. I also looked at Input/Subgraph arrays but I don't think these are for that purpose, rather they are for calculations. A solution is to use a Global variable with FreeDLL=0 but when you do this it makes it harder to build the DLL when changes have been made i.e. you have to exit and restart SC, during development this gets tiresome. At the moment I am continually reading from a file and storing in a global string array with freeDLL=1, although this will have performance issues. Off course I can set freeDLL=1 after development which will allow for persistent storage. My preference is to try to store locally within a function a list of strings in a persistent manner. Is there a way to do this that I haven't found? Regards |