Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » EGL Development Tools » Declaring NULL capable variables(What is the correct syntax to declare a NULL capable array?)
Declaring NULL capable variables [message #903930] Mon, 27 August 2012 10:59 Go to next message
Richard Moulton is currently offline Richard MoultonFriend
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
When defining a simple value variable I know how to define the field as NULL capable, such as the following, and understand that by default the field will contain a NULL value.

myInt int?;
myString string?;


But how do I declare an array as being NULL capable?

I tried all of the following and they all appear to be valid but I don't understand the difference.

myIntArray1 int[]?;
myIntArray2 int?[];
myIntArray3 int?[]?;


As a side note the section within code snippets, on the EDT:Declaring data page, I think there's a typo; the second example in the Values of type List isn't correct. Once I know the answer (to the above question) I can update it.

nullVals Int[];


Richard
Re: Declaring NULL capable variables [message #903954 is a reply to message #903930] Mon, 27 August 2012 12:41 Go to previous message
Justin Spadea is currently offline Justin SpadeaFriend
Messages: 66
Registered: July 2009
Member
Hi Richard,

Here's an explanation of each array type:

myIntArray0 int[];
The array field cannot be null, and elements in the array cannot be null.

myIntArray1 int[]?;
The array field can be null, but elements in the array cannot be null.


myIntArray2 int?[];
The array field cannot be null, but elements in the array can be null.

myIntArray3 int?[]?;
The array field can be null, and elements in the array can be null.

You are correct about the snippet being wrong, it should be "nullVals Int?[];"

Hope this clears things up.

-Justin
Previous Topic:Mobile widgets
Next Topic:Support for date and time operations?
Goto Forum:
  


Current Time: Thu Apr 25 06:20:04 GMT 2024

Powered by FUDForum. Page generated in 0.03071 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top