<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Convert and String to an expression read by the runtime</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/3b89d35735/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/3b89d35735/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/3b89d35735/</id><updated>2020-02-27T21:58:40.013000Z</updated><subtitle>Recent posts to Convert and String to an expression read by the runtime</subtitle><entry><title>Convert and String to an expression read by the runtime</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/3b89d35735/?limit=25#842e" rel="alternate"/><published>2020-02-27T21:58:40.013000Z</published><updated>2020-02-27T21:58:40.013000Z</updated><author><name>Yegor</name><uri>https://forge.codesys.com/u/yegor/</uri></author><id>https://forge.codesys.come7107fd742dd98f8f56de6f2f678ac06e93ca1bb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Nope. This would require an on-board compiler and reflection facilities, which is too much for resource-constrained environment running compiled code. Nevertheless, if all needed was a simple arithmetic expression support, I'd make my own evaluator function. Too much responsibility for the operator though.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Convert and String to an expression read by the runtime</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/3b89d35735/?limit=25#66ec" rel="alternate"/><published>2020-02-27T21:58:38.496000Z</published><updated>2020-02-27T21:58:38.496000Z</updated><author><name>fabou3377</name><uri>https://forge.codesys.com/u/fabou3377/</uri></author><id>https://forge.codesys.com0370b34f6cdeaf6a5e04b970f1a60667b88cb59b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is there a way to convert a string in a expression which is evaluated on the runtime...&lt;br/&gt;
Example&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;VAR&lt;/span&gt;
&lt;span class="nv"&gt;myVar1&lt;/span&gt;:&lt;span class="nv"&gt;BOOL&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;myVar2&lt;/span&gt;:&lt;span class="nv"&gt;BOOL&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;sMyString&lt;/span&gt;:&lt;span class="nv"&gt;STRING&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;END_VAR&lt;/span&gt;
&lt;span class="nv"&gt;sMyString&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;myVar1 AND myVar2&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="nv"&gt;MYEVALUTEFUNCTION&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;sMyString&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;
...
&lt;span class="nv"&gt;END_IF&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry></feed>