Array operation with boolean operator

Marco Leise Marco.Leise at gmx.de
Thu Mar 14 18:09:36 PDT 2013


Am Thu, 14 Mar 2013 22:15:11 +0100
schrieb "bearophile" <bearophileHUGS at lycos.com>:

> Andrea Fontana:
> 
> > But does sort!"a<b" still work if it returns an array?
> 
> See the difference in syntax:
> 
> a < b
> a[] < b[]
> 
> Bye,
> bearophile

This is "just" a syntax ambiguity. a[] takes the complete
slice of the array 'a'. And a dynamic array in D is a slice.
So if you use a or a[] in an expression doesn't make much of a
difference.

-- 
Marco



More information about the Digitalmars-d-learn mailing list