Array expression on the fly
2 posters
PAT Forum :: Support :: Using PAT :: CSP and PCSP Module
Page 1 of 1
Array expression on the fly
I have created a user-defined data type in C# that accepts integer arrays as a parameter. Is there a way in the CSP to create an array "on the fly" and pass it to my data type?
For example:
It seems that the only way to do it is to create a CSP array variable, initialize it, and pass the variable to the C# data type.
For example:
- Code:
var <IntArrayList> intList;
...
intList.Add([1, 2, 3, 4, 5]);
It seems that the only way to do it is to create a CSP array variable, initialize it, and pass the variable to the C# data type.
rsdunlapiv- Posts : 1
Join date : 2011-11-10
Re: Array expression on the fly
You are right. It is not supported.
One workaround is to use a global variable and declare it as hvar.
hvar will not be part of the system state, so you can use it as the temporary variable.
I will check whether I can support it in CSP module. If yes, I will let you know.
Please pass us your email. in case of any issue, I can email immediately.
One workaround is to use a global variable and declare it as hvar.
hvar will not be part of the system state, so you can use it as the temporary variable.
I will check whether I can support it in CSP module. If yes, I will let you know.
Please pass us your email. in case of any issue, I can email immediately.
rsdunlapiv wrote:I have created a user-defined data type in C# that accepts integer arrays as a parameter. Is there a way in the CSP to create an array "on the fly" and pass it to my data type?
For example:
- Code:
var <IntArrayList> intList;
...
intList.Add([1, 2, 3, 4, 5]);
It seems that the only way to do it is to create a CSP array variable, initialize it, and pass the variable to the C# data type.
Re: Array expression on the fly
I released a testing version to support this feature.
you can now put array as process arguments and call arguments.
http://www.comp.nus.edu.sg/~pat/PAT3.Setup.Test.msi
I didn't make it as generic type due to too many type checking
Let me know if anything wrong or more suggestions of the language.
you can now put array as process arguments and call arguments.
http://www.comp.nus.edu.sg/~pat/PAT3.Setup.Test.msi
I didn't make it as generic type due to too many type checking
Let me know if anything wrong or more suggestions of the language.
rsdunlapiv wrote:I have created a user-defined data type in C# that accepts integer arrays as a parameter. Is there a way in the CSP to create an array "on the fly" and pass it to my data type?
For example:
- Code:
var <IntArrayList> intList;
...
intList.Add([1, 2, 3, 4, 5]);
It seems that the only way to do it is to create a CSP array variable, initialize it, and pass the variable to the C# data type.
PAT Forum :: Support :: Using PAT :: CSP and PCSP Module
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|