04-04-2006 02:40 PM
04-04-2006
04:26 PM
- last edited on
06-30-2025
02:08 PM
by
Content Cleaner
04-04-2006 05:49 PM
04-04-2006 05:52 PM
04-05-2006 01:20 PM
What's up doc?
I did a mass compile and I got numerous compilation errors (see attachment).
Anyways, do any of these errors effect the .NET development. If not, I am still getting the same unexpected results that I got before the mass compile (i.e. input arrays show up as both in/out and output arrays still need to be dereferenced).
Please advise me as to what I need to do in order to fix these problems.
Thanks,
Bugs
04-05-2006 03:51 PM
04-06-2006 01:31 PM
Hi Brian,
I have enclosed a Microsoft Word document capturing how we think LabView should handle parameter passing.
Your comment:
void foo(int[] data)
In 8.0, this shows up as an input only for the invoke node. The problem here is that, since the array is copied from LV to .NET data types, any modification done to the array "data" is lost. So, in 8.0.1, this has both an input and output terminal, so that the .NET array "data" is copied back out into LV data. This allows you to handle the modifications (such as for int Read(char[] buffer))
My response:
If you pass a parameter in by value (i.e void foo(int[] data), then the .NET assembly method should copy the data. Any modifications that the .NET assembly method does to its copy of the data should not modify the data within LV. However, if you pass a parameter in by reference (i.e. int Read(char[]& buffer), then the .NET assembly should be able to modify the "buffer" within LV.
Your comment:
void foo(out int[] data)
In this case, the data is passed by reference, so what you should see is an output only terminal on the invoke node, with the data type being a reference to the array (.NET refnum). The reason it's a refnum is that it's a reference to the data, not the data itself (that is what the ref or out keywords mean in C#). However, due to feedback I've already received, we're changing that in the next release of LabVIEW (code named Europa), so that it should appear as an output only terminal which returns a LV data of int32s.
My response:
Should the prototype be "void foo(out int[]& data)"? I am with your other users, please dereference your output arrays.
Final comments:
Will the next release still be LabView8.x or LabView9? We want to use LabView with .NET assemblies, but we need the parameter passing issue resolved.
Thanks for help,
Bugs Bunny
04-06-2006 04:09 PM
04-11-2006 04:12 PM