[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: idl2matlab translate-o-matic



In article <38B2C805.FF565716@astro.cornell.edu>,
  "J.D. Smith" <jdsmith@astro.cornell.edu> wrote:
> Craig Markwardt wrote:
> > (stuff deleted)
> >If you don't believe me, try doing
> > the following (apparently simple) problem:
> >
> >  * given two arrays, A and B: concatenate all but the last two
> >    elements of A, with B.  Don't try [A(0:n-3),B], or you will be in
a
> >    world of hurt.
> >
>
> I wouldn't say a *world* or hurt.  Maybe a minor planetesimal of hurt:
>
> C=n_elements(A)>2?[A[0:n_elements(A)-3],B]:B
>
> JD
>

I think that in actual implementation, two or three lines of comments
should go with the above statement.  After all, the discussion was about
the professional aspects of the language :-)

Mirko


Sent via Deja.com http://www.deja.com/
Before you buy.