Arrays

Please log all suggestions for improvements and enhancements to Visual LANSA here. Entries may be acknowledged and may be added to the list for possible inclusion in later releases of Visual LANSA.
Post Reply
soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

Arrays

Post by soa » Fri Aug 09, 2019 11:02 am

I've been using the LI ExcelService Recently and to populate the sheets body you need to specify either a working list or (for the RP version) a collection.

If you use a working list you can create a two dimensional array by creating a bunch of fields and putting a DEF_ARRAY over them then putting those fields in your list. Then you can achieve setting a column(x) value by index and get elements by row(y). This is cumbersome and error prone, I just had to define a 100 fields and DEF_ARRAY does not issue an error for duplicates (or omissions). Plus I have to specify the length of every field so I have to use the maximum expected value. This can't be memory efficient and will break if I have one item too long (truncated value).

With a collection I can't see anyway of achieving this.

Surely in RDMLX there should be a way of define a two dimensional string array index by #x #Y? If this is impossible then RDML must be the only programming language ever devised that doesn't support this.

I'd be very happy to be proved wrong but otherwise this is my suggestion for a product enhancement!

Cheers
Jim

LANSAGuru
Posts: 68
Joined: Thu Mar 24, 2016 5:31 am

Re: Arrays

Post by LANSAGuru » Fri Aug 09, 2019 11:02 pm

+1 on arrays

could be useful in spreadsheet applications, or applications where you want to access things 1 cell at a time...you can of course emulate this, but it is cumbersome to build the abstraction yourself

unlike a working list which is fixed in width an array should be able to add rows and or columns dynamically so you can add cells 1 at a time and you don't necessarily have to fill in gaps so you can have an empty array (like a spreadsheet) and just start filling in cells by row and column...excel is the perfect application of this concept I would say...begs the question of the TYPE of value in each cell of course...how would that work exactly as currently things are a fixed type....could each cell be a dynamic TYPE as well?

well...let's see who else likes this idea

Post Reply