<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Add method, return type</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/43325f5e4e/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/43325f5e4e/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/43325f5e4e/</id><updated>2020-02-27T13:53:08.610000Z</updated><subtitle>Recent posts to Add method, return type</subtitle><entry><title>Add method, return type</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/43325f5e4e/?limit=25#4ff1" rel="alternate"/><published>2020-02-27T13:53:08.610000Z</published><updated>2020-02-27T13:53:08.610000Z</updated><author><name>Rob</name><uri>https://forge.codesys.com/u/rob/</uri></author><id>https://forge.codesys.comdbd4fdb6cd22174c820cd6a46a9d7c391749c992</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;scott_cunningham hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
MyMethod := Dummy;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks!! This was the part I was missing !! &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Add method, return type</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/43325f5e4e/?limit=25#9dad" rel="alternate"/><published>2020-02-27T13:53:08.435000Z</published><updated>2020-02-27T13:53:08.435000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com8b9c9c1f33416fa0e32548bcbeac2ce79bce832d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; scott_cunningham&lt;/p&gt;
&lt;p&gt;If you only want to return one variable, use the return type.  To assign a value, do something like below.  If you need to return multiple variables, use VAR_OUTPUT. &lt;/p&gt;
&lt;p&gt;Example will return 7 when you call the method. &lt;/p&gt;
&lt;p&gt;METHOD MyMethod : INT&lt;/p&gt;
&lt;p&gt;VAR&lt;br/&gt;
   Dummy : INT := 7;&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;MyMethod := Dummy;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Add method, return type</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/43325f5e4e/?limit=25#deb1" rel="alternate"/><published>2020-02-27T13:53:08.268000Z</published><updated>2020-02-27T13:53:08.268000Z</updated><author><name>Rob</name><uri>https://forge.codesys.com/u/rob/</uri></author><id>https://forge.codesys.comdcb893002cc0632b57572d9cae61e6136c9d7ccf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello everybody,&lt;br/&gt;
I have a very basic/beginner question:&lt;br/&gt;
When implementing a method, there is a field on the "Add Method" Window called "Return Type" (for BOOL,  and other types)...I couldn't find at the Codesys Online Help further information about this and I'm not sure to understand when a method returns, let's say, an assigned Bool type to what variable...how do I assign a bool variable in the method to a return? or what is this exactly for? ...sorry for the dumb question, could someone please show me a simple example of a use case for this?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>