Support "unlimited" Extent Variables

  • Thread starter Thread starter dlauzon
  • Start date Start date
Status
Not open for further replies.
D

dlauzon

Guest
From manual: "You can also assign directly between any one-dimensional .NET array and an ABL array (EXTENT variable) of compatible element type and extent. ABL thus supports the implicit mapping of array element types when you assign between compatible ABL and.NET arrays." While this is mostly true, you always run the risk of busting the EXTENT limit at some point (e.g. call a .NET method that sometimes returns a vast number of System.IO.FileInfo... it works while you don't get to that case), so while that mechanism is very useful, it is also very risky. E.g. we could remove the following limits (maybe with an optional keyword on the variable definition): DEFINE VARIABLE c AS CHARACTER NO-UNDO EXTENT 2000 . c[ 1 ] = FILL ( "a" , 30000 ). --> "Attempt to update data exceeding 32000. (12371)" DEFINE VARIABLE c AS System.Object NO-UNDO EXTENT 32000 . --> "Array extent may not be greater than 28000 (3350)" DEFINE VARIABLE c AS System.Object NO-UNDO EXTENT . EXTENT (c) = 28000 + 1000 . --> "Indeterminate extent dimension 29000 is out of range 1 to 28000. (11385)"

Continue reading...
 
Status
Not open for further replies.
Back
Top