<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: LVOOP in BreakPoint</title>
    <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/931848#M7828</link>
    <description>Thanks Ben.&lt;BR /&gt;I'm gonna read through your post a couple hundred times and see if I can digest all that &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://ni.lithium.com/i/smilies/16x16_smiley-very-happy.gif" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;</description>
    <pubDate>Tue, 23 Jun 2009 15:10:03 GMT</pubDate>
    <dc:creator>Cory_K</dc:creator>
    <dc:date>2009-06-23T15:10:03Z</dc:date>
    <item>
      <title>LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/930112#M7809</link>
      <description>&lt;P&gt;Does a 'class' in LVOOP mean the same thing as defining a 'class' in other text based languages, such as Python?&lt;BR /&gt;Can you define functions and operators for the class as well?&lt;BR /&gt;&lt;BR /&gt;I have never seen LVOOP code (that I am aware of) and was just curious.&lt;/P&gt;&lt;P&gt;Any recommendations on somewhere to learn the basics?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2009 17:17:22 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/930112#M7809</guid>
      <dc:creator>Cory_K</dc:creator>
      <dc:date>2009-06-19T17:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/930127#M7810</link>
      <description>&lt;P&gt;&lt;A href="https://forums.ni.com/t5/Example-Code/Applying-Common-Object-Oriented-OO-Design-Patterns-to-LabVIEW/ta-p/3510571" target="_blank" rel="noopener"&gt;Moving Common OO Design Patterns From Other Languages Into LabVIEW&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.ni.com/en/support/documentation/supplemental/06/labview-object-oriented-programming--the-decisions-behind-the-de.html" target="_blank" rel="noopener"&gt;LabVIEW Object-Oriented Programming: The Decisions Behind the Design&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.ni.com/en/support/documentation/supplemental/06/labview-object-oriented-programming-faq.html" target="_blank" rel="noopener"&gt;LabVIEW Object-Oriented Programming FAQ&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.ni.com/t5/Western-PA-LabVIEW-Users/What-the-heck-is-Object-Oriented-Programming-anyway/td-p/3474619" target="_blank" rel="noopener"&gt;What the heck is Object Oriented Programming, anyway?&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.ni.com/en-us/shop/product/object-oriented-design-and-programming-in-labview-course.html" target="_blank" rel="noopener"&gt;LabVIEW Object-Oriented Programming System Design&lt;/A&gt;&amp;nbsp;(course)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.ni.com/t5/User-Group-Resource-Center/Introduction-to-LabVIEW-Object-Oriented-Programming/td-p/3526688" target="_blank" rel="noopener"&gt;LabVIEW Object-Oriented Programming&lt;/A&gt;&amp;nbsp;(presentation)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by altenbach on &lt;/SPAN&gt;&lt;SPAN class="local-date"&gt; 06-19-2009&lt;/SPAN&gt;&lt;SPAN class="local-time"&gt; 10:47 AM&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 25 Apr 2025 19:00:06 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/930127#M7810</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2025-04-25T19:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/930134#M7811</link>
      <description>&lt;P&gt;Just using their example, an array that is always sorted:&lt;BR /&gt;&lt;BR /&gt;You define a certain type of array, such that every time an element is added, it is placed&amp;nbsp;in its correct index in the array.&lt;/P&gt;&lt;P&gt;This seems relatively straight forward, but how about classes where you must define operators?&lt;/P&gt;&lt;P&gt;For example, look at the operator '+'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LabVIEW knows that &lt;/P&gt;&lt;P&gt;1 + 1 = 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;or&lt;/P&gt;&lt;P&gt;an array of values + another array = sum of respective indexes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But say you wanted to make a class called 'Words' (essestially strings, but use this as an example)&lt;/P&gt;&lt;P&gt;How would you define the operator + to be used as a concatenator.&lt;/P&gt;&lt;P&gt;word1 + word2 = word1word2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or define new operators, for example $ (which for this case would alternate letters)&lt;/P&gt;&lt;P&gt;word1 $ text2 = wtoerxdt12&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by Cory K on &lt;/SPAN&gt;&lt;SPAN class="local-date"&gt; 06-19-2009&lt;/SPAN&gt;&lt;SPAN class="local-time"&gt; 01:02 PM&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 19 Jun 2009 18:02:35 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/930134#M7811</guid>
      <dc:creator>Cory_K</dc:creator>
      <dc:date>2009-06-19T18:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/930402#M7812</link>
      <description>&lt;P&gt;I think this really belongs in the LabVIEW forum...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... but, as far as your question is concerned: you can't overload operators in LabVIEW. You would need to make a method (or methods, depending on how many variations of datatypes between the left and right side of the operation you wanted to handle) for the class that performs that operation. It would be no different than if you were to do it in Java, which I believe does not allow overloading of operators.&amp;nbsp; &lt;/P&gt;</description>
      <pubDate>Sat, 20 Jun 2009 16:55:43 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/930402#M7812</guid>
      <dc:creator>smercurio_fc</dc:creator>
      <dc:date>2009-06-20T16:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/930471#M7814</link>
      <description>&lt;P&gt;Yeh, I wasnt really sure if I should post an LVOOP question in the LabVIEW forums.&lt;/P&gt;&lt;P&gt;I am not actually using OOP in my LabVIEW code, I was just curious how it is implemented.&lt;/P&gt;&lt;P&gt;I like to learn new stuff, even if I dont necessarily need it.... which is the rationale all my math professors&amp;nbsp;above calc 4 used &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://ni.lithium.com/i/smilies/16x16_smiley-very-happy.gif" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jun 2009 03:37:22 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/930471#M7814</guid>
      <dc:creator>Cory_K</dc:creator>
      <dc:date>2009-06-21T03:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/931593#M7827</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Cory K wrote: &lt;BR /&gt;&lt;P&gt;Just using their example, an array that is always sorted:&lt;BR /&gt;&lt;BR /&gt;You define a certain type of array, such that every time an element is added, it is placed&amp;nbsp;in its correct index in the array.&lt;/P&gt;&lt;P&gt;This seems relatively straight forward, but how about classes where you must define operators?&lt;/P&gt;&lt;P&gt;For example, look at the operator '+'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LabVIEW knows that &lt;/P&gt;&lt;P&gt;1 + 1 = 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;or&lt;/P&gt;&lt;P&gt;an array of values + another array = sum of respective indexes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But say you wanted to make a class called 'Words' (essestially strings, but use this as an example)&lt;/P&gt;&lt;P&gt;How would you define the operator + to be used as a concatenator.&lt;/P&gt;&lt;P&gt;word1 + word2 = word1word2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or define new operators, for example $ (which for this case would alternate letters)&lt;/P&gt;&lt;P&gt;word1 $ text2 = wtoerxdt12&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by Cory K on &lt;/SPAN&gt;&lt;SPAN class="local-date"&gt;06-19-2009&lt;/SPAN&gt;&lt;SPAN class="local-time"&gt; 01:02 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I believe yes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LVOOP is built around LV clusters. They are special clusters that have some unique features.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) They don't have to have any data in them.&lt;/P&gt;&lt;P&gt;2) They are all children of a generic LV cluster.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LVOOP will generate VI to put things into the clusters and get them out. They are called accessors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LVOOP has dynamic dispatching. This sorta works like polymorphic VIs but instead of the version of polymorhpic VI being determined at compile time it is performed at run time (stop and ponder that trick for a minute). &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dynamic dispatching decides which Class is being used and uses the VI from that class when it is time to execute the VI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You establish which VI gets called by how you define you class inheritance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The VI that get called implement the methods as appropriate for tht class. This is called an over-ride VI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Methods in a class can call other methods of that class or it paraents. It can even call itself if you think re-cursiveness is the right approach.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SO to implement you Q above I would set up the class hiarchy such that after you have set the values "A" and "B" then invoke the method "Add" adn when using the numbers they would add and if string then they would concantenate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2009 11:24:04 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/931593#M7827</guid>
      <dc:creator>Ben</dc:creator>
      <dc:date>2009-06-23T11:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/931848#M7828</link>
      <description>Thanks Ben.&lt;BR /&gt;I'm gonna read through your post a couple hundred times and see if I can digest all that &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://ni.lithium.com/i/smilies/16x16_smiley-very-happy.gif" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;</description>
      <pubDate>Tue, 23 Jun 2009 15:10:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/931848#M7828</guid>
      <dc:creator>Cory_K</dc:creator>
      <dc:date>2009-06-23T15:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932299#M7830</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Ben wrote: &lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You establish which VI gets called by how you define you class inheritance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The VI that get called implement the methods as appropriate for tht class. This is called an over-ride VI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Methods in a class can call other methods of that class or it paraents. It can even call itself if you think re-cursiveness is the right approach.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SO to implement you Q above I would set up the class hiarchy such that after you have set the values "A" and "B" then invoke the method "Add" adn when using the numbers they would add and if string then they would concantenate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This is the part I cant wrap my head around. So any user defined class's parent, at the highest level, is clusters?&lt;BR /&gt;So need to define both the class, and methods to operate on any object in that class?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2009 02:47:45 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932299#M7830</guid>
      <dc:creator>Cory_K</dc:creator>
      <dc:date>2009-06-24T02:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932513#M7837</link>
      <description>&lt;P&gt;Hi Cory,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I threw this together fro you this AM. THe index control determins if it si add or concantentate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't have time to do screen shots but try single stepping into the add using the two versions and you will see dynamic dispatch in action.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this helps please post some sreen shots to help out others.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2009 11:05:38 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932513#M7837</guid>
      <dc:creator>Ben</dc:creator>
      <dc:date>2009-06-24T11:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932592#M7838</link>
      <description>&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i had editied the icons to name the values the code would read cleaner.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The index control of teh index array will select either Numeric class or sting class. once selected teh class selected will invoke the method that is appropriate for that class.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Play with the properties of the class to adjut the mask ued for the class icons and wire appearence.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ask whatever Qs come up. WE can turn this thread into a intro to LVOOP for LV types, ... well maybe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2009 12:36:34 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932592#M7838</guid>
      <dc:creator>Ben</dc:creator>
      <dc:date>2009-06-24T12:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932750#M7839</link>
      <description>Thanks for the example&amp;nbsp;Ben.&lt;BR /&gt;That really tied everything together. &lt;BR /&gt;I'm going to play around with that for a while, and see if any questions arise.</description>
      <pubDate>Wed, 24 Jun 2009 15:04:57 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932750#M7839</guid>
      <dc:creator>Cory_K</dc:creator>
      <dc:date>2009-06-24T15:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932772#M7840</link>
      <description>&lt;P&gt;Please edit the icons (good leason to learn what part comes from the class and what part are VI specific) and post some screen shots with a short narative please. I am on-site with an old version of LV and can't do so myself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your reply with those screen shots will be agood intro for others and it will let us check your understanding (as well as me learn from others that know LVOOP better than me).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to learn as a team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2009 15:19:13 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932772#M7840</guid>
      <dc:creator>Ben</dc:creator>
      <dc:date>2009-06-24T15:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932782#M7841</link>
      <description>&lt;P&gt;Sure, I will try to get some screen shots up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quick question : I tried to create a new class. I put 3 controls in the cluster for the newly created class.&lt;BR /&gt;When I created a new VI, I tried to unbundle the class to access the elements, but I got an error saying the class was 'private'.&lt;BR /&gt;Am I doing something incorrectly?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2009 15:25:45 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932782#M7841</guid>
      <dc:creator>Cory_K</dc:creator>
      <dc:date>2009-06-24T15:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932793#M7842</link>
      <description>&lt;P&gt;The Unbundle by name etc can only be used by a VI that is a member of the class. Right click on the class and choose "create accessor". THis will give you a dialog that will then create the accessors for you. Use the accessors to put dat in and get data out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2009 15:33:33 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932793#M7842</guid>
      <dc:creator>Ben</dc:creator>
      <dc:date>2009-06-24T15:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932829#M7843</link>
      <description>&lt;P&gt;Here is my understanding of Bens code. Take it with a grain of salt.... or rather, the amount of salt on McDonald's french fries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the top level VI, named Test.vi, you can 'add' A and B.&lt;/P&gt;&lt;P&gt;The index will tell the VI whether to treat A and B as an instance of the 'data' class or an instance of the 'strings' class.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both classes are clusters of 3 controls : A, B, and Answer&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forums.ni.com/t5/image/serverpage/image-id/1041iA1E3C0F02B7BE01F/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Controls.PNG" title="Controls.PNG" align="center" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, if you enter A = 8 and B = 9:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you set the index to 0, both A and B will be treated as numbers.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forums.ni.com/t5/image/serverpage/image-id/1033i12E805D53C5095EE/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Add Numbers.PNG" title="Add Numbers.PNG" align="center" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you set the index to 1, A and B will be treated as strings, so 'adding' them will concatenate.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forums.ni.com/t5/image/serverpage/image-id/1034i41B7DED9B714D710/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Add Strings.PNG" title="Add Strings.PNG" align="center" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the code for Test.VI, you can see that first the two&amp;nbsp;class constants (data and string)&amp;nbsp;are built to an array.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forums.ni.com/t5/image/serverpage/image-id/1035iC3C6EC2FD3E37A24/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Top Level.PNG" title="Top Level.PNG" align="center" /&gt;&lt;BR /&gt;The index then chooses which class to operate with.&lt;/P&gt;&lt;P&gt;The next 2 functions create an instance of A and an instance of B respectively as the selected class.&lt;/P&gt;&lt;P&gt;Write A:&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forums.ni.com/t5/image/serverpage/image-id/1036iC084C235BF31A11C/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Write A.PNG" title="Write A.PNG" align="center" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Write B:&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forums.ni.com/t5/image/serverpage/image-id/1037i35FE63AB201DBBF9/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Write B.PNG" title="Write B.PNG" align="center" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once A and B are defined as objects of the selected class, they are 'added'.&lt;/P&gt;&lt;P&gt;The 'Add' VI first figures out what class the objects are in, then adds them accordingly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it determines that A and B are numbers (instances of 'data')&amp;nbsp;it will add the two values:&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forums.ni.com/t5/image/serverpage/image-id/1038i75315D34FE050A53/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Add Numbers Code.PNG" title="Add Numbers Code.PNG" align="center" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it determines that A and B are instances of the class 'strings' it will concatenate:&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forums.ni.com/t5/image/serverpage/image-id/1039iCAE9606E5279AD3C/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Add Strings Code.PNG" title="Add Strings Code.PNG" align="center" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In both cases, the returned value is passed to the control 'answer'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This answer is read by 'Read Answer.vi':&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forums.ni.com/t5/image/serverpage/image-id/1040i38B1675861BABFDA/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Read Answer.PNG" title="Read Answer.PNG" align="center" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The user then sees the final answer of the whole operation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope I didnt butcher that explination too much.&lt;/P&gt;&lt;P&gt;Feel free to explain further if you feel I left anything out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2009 15:58:25 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932829#M7843</guid>
      <dc:creator>Cory_K</dc:creator>
      <dc:date>2009-06-24T15:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932838#M7844</link>
      <description>&lt;P&gt;Good work!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is starting to look more like a "nugget".&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2009 16:05:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932838#M7844</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2009-06-24T16:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932864#M7845</link>
      <description>&lt;P&gt;Excellent Cory!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me split hairs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only the parent class "Data" has anything in its private data cluster. The other two classes do not have their own data, they inherit the data from their parent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THe two child classes Numeric and Strings only have a single VI each. THey have their own version of the "add" VI (method) that is used to over-ride the callers version of "add" when it comes to execute that function. Which type is used is determined by which class it was passed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you Cory!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2009 16:25:58 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/932864#M7845</guid>
      <dc:creator>Ben</dc:creator>
      <dc:date>2009-06-24T16:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/933067#M7846</link>
      <description>Ben, for your 'add' VI in the top level VI, how did you import the other 2 add&amp;nbsp;VIs so it knew to only select from among those 2?</description>
      <pubDate>Wed, 24 Jun 2009 21:14:12 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/933067#M7846</guid>
      <dc:creator>Cory_K</dc:creator>
      <dc:date>2009-06-24T21:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/933157#M7847</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Cory K wrote: &lt;BR /&gt;Ben, for your 'add' VI in the top level VI, how did you import the other 2 add&amp;nbsp;VIs so it knew to only select from among those 2? &lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After creating the dummy add in the top level class and defing the child classes I,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Right-click (in proj window) on child class&amp;nbsp;and select Create Vi for over-ride.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That will give you a dialog window to choose which VI you want to over-ride (any of the ancestors VI with dynamic dispatch connectors (I think).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Repeat for the other class or "&lt;STRONG&gt;Copy Save as" on one class to&amp;nbsp;clone it&lt;/STRONG&gt; and then mod&amp;nbsp;the over-ride VI for the other class.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you right-click the class&amp;nbsp;and choose properties you can define your inheritance to control which classes that class inherit from.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the over-ride all of the time to define my class names. In the "Create_New" methods (OOP talk for creating a new instance, ie "Init" ) an over-ride VI calls its parents "Read Class Name" property (Cludge that is helping my until I learn a better way) and appends its name and writes it back to "Class Name". When read by the child class when executing it reads like a VI call chain, a kind of class chain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have fun and keep asking questions. I'm just learning LVOOP myself and thinking about your questions is helping me a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2009 01:31:43 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/933157#M7847</guid>
      <dc:creator>Ben</dc:creator>
      <dc:date>2009-06-25T01:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: LVOOP</title>
      <link>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/937249#M7868</link>
      <description>&lt;P&gt;I just looked through DFGray's Xylophone project.&lt;/P&gt;&lt;P&gt;That really shows how powerful LVOOP is.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2009 16:15:24 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/BreakPoint/LVOOP/m-p/937249#M7868</guid>
      <dc:creator>Cory_K</dc:creator>
      <dc:date>2009-07-01T16:15:24Z</dc:date>
    </item>
  </channel>
</rss>

