Skip to main content



      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 06:59 Go to next message
Eclipse UserFriend
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 08:41 Go to previous message
Eclipse UserFriend
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: Sat May 17 11:15:36 EDT 2025

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

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

Back to the top