by Chris McIntosh » January 20th, 2011, 4:35 pm
Thanks for your help, Ajay,
I have to be missing something very simple. This can't be this complicated.
In it's simplest form, how can I pass a C# variable of type string[,] to APL, and have APL update element [0,0] of that variable, and return the updated version.
If you can give me a working example of that, that is really all I'm looking for. All the complications above are just trying to accomplish that what seems to me to be a pretty trivial task.
To put what I've said in code, here's what I'd like to do.
In C#:
protected void PerformTests()
{
// Create a string array.
string[,] TestVar = new string[,] { { "One", "Two", "Three", }, { "Four", "Five", "Six" } };
// Update it.
string[,] UpdatedVar = AplCode.UpdateStringArray(TestVar);
}
In APL:
public static string[,] UpdateStringArray(string[,] input)
{
// The magic line goes below.
?????????
// Return test.
return input
}
I think I have a workaround (or maybe the real answer?) now.
I was under the impression I couldn't return an APL variable to a C# program, which is why I was going through the many contortions above. The code below seems to work
public static object[,] WantAplVar()
{
// Create a variable.
Test â†