On Nov 1, 2016, at 6:00 PM, Cannon Smith wrote: > The other solution would be to have 4D introduce the idea of a static > variable. So if I declared an interprocess variable the normal way, it would > not be allowed in preemptive processes. But if it was declared as static, > then it is only read only for any process once it is set so I assume that a > preemptive process could read this variable without issue. This would solve > most of my issues with interprocess variables in preemptive processes.
Static variables, interesting idea. Special new variable table that is optimize to work with preemptive methods. Static variables are read only from a preemptive method. You can use them in non-preemptive processes. They work basically just like IP variables, except they are thread safe when referenced in preemptive processes. Maybe the only way to set a static variable value would be to do it in a non-preemptive method. Just stream of consciousness thinking here... What would the variable name prefix be for static variables: ^officeCode_t or *officeCode_t. or #officeCode_t? Then you could use the “Rename” command in design to quickly update all your code with the new variable name. Or would you change compiler directives and add the infamous “*” parameter to indicate this is a static variable C_TEXT(officeCode_t;*). This might be the feature request that Tony really wants and needs. Heck, now that I think about it, I want this too! Tim ******************************************** Tim Nevels Innovative Solutions 785-749-3444 [email protected] ******************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

