NI TestStand Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
bienieck

Empty Array Literal

Status: New

Currently, there is no unambiguous solution for passing empty Array of X (where X is a different type than 64-bit Floating Point) as a sequence parameter. If we use {} it is assumed to be of type 64-bit Floating Point. To have an empty Array of Strings we can use ambigues Split("",""). I have no idea how to pass e.g. empty Array of Signed 64-bit Integer without creating empty variables.

 

It would useful to have Empty Array Literals of a particular type e.g.:

{} - default

{}i64 - for Signed 64-bit Integer

{}ui64 - for Unsigned 64-bit Integer

{}s - for String

{}b - for Boolean

{}r - for Object Reference

{}c - for Container

{}TYPE_NAME - for type definition where TYPE_NAME is type definition name; e.g. Path.

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
1 Comment
Mr._Jim
Active Participant

Michał, I know it's been a while since you posted this, but it's nice to know that someone else has run into this.

I always thought, "There must be some way of doing this, but I just don't have the nuanced knowledge to accomplish it."

I also make empty "constant" locals, etc. to denote empty arrays, but it seems silly to have to do so.