<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to String functions in different tasks</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/07cddcd187/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/07cddcd187/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/07cddcd187/</id><updated>2020-02-27T22:41:47.108000Z</updated><subtitle>Recent posts to String functions in different tasks</subtitle><entry><title>String functions in different tasks</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/07cddcd187/?limit=25#2966" rel="alternate"/><published>2020-02-27T22:41:47.108000Z</published><updated>2020-02-27T22:41:47.108000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com99f2671d5746c8c5ea2e3e3c0c19e089387f1e32</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;dont worry to much.&lt;br/&gt;
it indeed has to do with interupts etc. However just dont change a string in a interupt.&lt;br/&gt;
when doing a for next loop it can be interupted. but if you have no interupts running it is no problem, as a function is completed (or a rung is done, however multilines are not obvious)&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>String functions in different tasks</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/07cddcd187/?limit=25#41f9" rel="alternate"/><published>2020-02-27T22:41:45.532000Z</published><updated>2020-02-27T22:41:45.532000Z</updated><author><name>pnn</name><uri>https://forge.codesys.com/u/pnn/</uri></author><id>https://forge.codesys.comba9b4f609c8fc5ffa5e9e62e6744b6b468c8603f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;in Codesys v.2 help there is a warning that string functions are not thread safe and the same function shouldn't be used in different tasks because there is a danger of overwriting. &lt;/p&gt;
&lt;p&gt;My question is, does this apply to all string functions - including LEN and FIND, which return INT - or only to the rest (LEFT, CONCAT etc.) that return STRING ? Can I safely use LEN and FIND from different tasks or they may return a wrong number?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;--&lt;br/&gt;
BTW is it possible a task switching to occur while a function executes, if there are no tasks triggered by events?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>