From: Julian A. de M. Ph.D <ju...@ma...> - 2001-05-18 02:37:57
|
I've been watching patches & usage tips float past it seems forever now. Do y'all not fancy we could compile these @SF in a way that's easier to use than troving through the octave.org mailing list archives? Another unsolicited, obvious, back-seat remark from joolean -----Original Message----- From: oct...@be... [mailto:oct...@be...]On Behalf Of Jianming Sent: Thursday, May 17, 2001 6:47 AM To: Paul Kienzle; octave-sources Cc: John W. Eaton Subject: Re: Cell array support Hi, Attached are the new patches for cell array support with octave (2.1.34). After experimenting with various implementations, I've taken mo= st of your advices regarding the following: 1. Using () to access cell elements should not narrow down to the bas= e type automatically. This will reduce confusion. I.E, narrowing conversion= is removed. 2. Using ASSIGNANYOP in op-cell.cc Attached also is a sample session with the patch. Some comments on th= e (incomplete) patch: 1. Some features with Paul mentioned in the previous email are missin= g: a) {} producing multi-valued output b) {} receive multi-valued output, c) splice cell arrays into an argument list =E0 la Matlab: 2. As shown in the sample session, assigning cell elements to an undefined indexed variable will give an error. To overcome this, cell(0,0= ) must be used first to "declare" the variable as a cell. There is no probl= em assigning cell elements to an undefined variable in it's entirety though. 3. Increasing the size of a cell array will not give unassigned eleme= nts as empty matrices as Matlab does. Instead, the undefined elements will ha= ve undefined type until assigned a value. 4. Removing elements from a cell is done using {} instead of []. This= is simpler to implement. In fact, there is no need for any code for this. If= we want to use [], I believe we have to delibrately check the type of the le= ft hand side first. I don't really like this hack. Any comments, improvements are welcomed. Thanks Paul for your comment= s in the previous emails. I hope this gets into 2.1.35 together with some o= f your patches for cell functions. Regards, Jianming |