Eugen Graf Posted January 24, 2009 Report Share Posted January 24, 2009 Is there any possibility to "simulate" Call By Reference using LVOOP? I mean if my class contains only refnums to real objects or something like that. The problem is that some of my classes contains very large members and if I call member VIs, than each member VI will get the whole class but needs e.g. only to read one value. Thanks, Eugen Quote Link to comment
Aristos Queue Posted January 24, 2009 Report Share Posted January 24, 2009 Just because the subVI gets the entire class does NOT mean that the entire class gets copied. If you pass a class into a subVI then unbundle a single element, the class is not copied at the call. If you then use that single element in a read-only way (for example, connecting it to the select terminal of a case structure) the class is still not copied at the call. If you use the element in a write operation (such as wiring it to the Increment primitive), the element is copied, but the class is still not copied at the call. If you then bundle the incremented element back into the class, the class MAY be copied at the call, depending upon whether the particular call itself is already set up for writing (for more details see the large body of documents across the WWW about "inplaceness"). Is that enough reference for you? Quote Link to comment
Eugen Graf Posted January 24, 2009 Author Report Share Posted January 24, 2009 Yes, this info is exactly what I needed. Would you give me please a link, where inplaceness in LabVIEW is describen very well. Thank you, Eugen Quote Link to comment
Aristos Queue Posted January 24, 2009 Report Share Posted January 24, 2009 QUOTE (Eugen Graf @ Jan 23 2009, 10:19 AM) Yes, this info is exactly what I needed. Would you give me please a link, where inplaceness in LabVIEW is describen very well. No. Because if I gave you such a link, you'd start caring about it. Stop caring. Really. Let LV make copies when it sees that your code needs copies and stop worrying about it. If you really hit a performance problem, you can dig into the topic further, but until then, let it go. It is almost never of interest to a LabVIEW programmer. Quote Link to comment
Eugen Graf Posted January 24, 2009 Author Report Share Posted January 24, 2009 Ok, I'll belief you on this point. Thank you for nice support, Eugen Quote Link to comment
Grampa_of_Oliva_n_Eden Posted January 24, 2009 Report Share Posted January 24, 2009 QUOTE (Eugen Graf @ Jan 23 2009, 12:20 PM) Ok, I'll belief you on this point.Thank you for nice support, Eugen Hi Eugen, Although I don't care about inplaceness (cough, cough) if you ever find that you have to care about inplaceness then you may want to chase down all of the links and related links that I did not care to assemble in http://forums.ni.com/ni/tagging/view_tag?tag.text=Inplaceness&tag.message_scope=all' target="_blank">this Tag on the dark-side. Still not caring about inplaceness, Ben Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.