passing arrays of unspecified length

Hello; How does one pass an array to a function without any length specifications. Ex: function BSearch(KeyValue: code; var SearchList: array [5000] of code): boolean; The search function may not know how big SearchList is, especially if BSearch is in a code unit shared among different applications. Brian.

You will have to make it as big as the biggest array that will use it. Navision does not support dynamic reindexing as vb does. Bill Benefiel Manager of Information Systems Overhead Door Company billb@ohdindy.com (317) 842-7444 ext 117

why use an Array? would it not be better to pass a record set or a buffer record set? Then your “Array” is the no of records! How would you search this array for your KeyValue? for i := etc: you can’t SetFilter or SetRange on an Array! David Cox MindSource (UK) Limited Navision Solutions Partner Email: david@mindsource.co.uk Web: www.mindsource.co.uk

I think David is right. More over is you arrays of sizes greater than 100 you may land into slow execution cycles of the program. Especially if its a codeunit used throught out the application. Arrays are best used with in the size of 100 cell values i.e [10,10] or [100]. Passing records is a much better option than using arrays. The maximum array size navision can support is [100,100]. THanks, Best regards, Prashanth pbg@navilogic.com

Yeah! We definetly are missing on the beauty of implementing true Linked List as you can do in C/C++ tarek_demiati@ureach.com