Jump to page: 1 26  
Page
Thread overview
DMD 0.99 release
Aug 20, 2004
Walter
Aug 20, 2004
kinghajj
Aug 20, 2004
Derek Parnell
Aug 20, 2004
kinghajj
Aug 20, 2004
Ben Hinkle
Aug 20, 2004
Walter
Aug 20, 2004
Matthew
Aug 20, 2004
Walter
Aug 20, 2004
Matthew
Aug 20, 2004
Sean Kelly
Aug 20, 2004
Matthew
Aug 20, 2004
Thomas Kuehne
Aug 20, 2004
Matthew
Aug 20, 2004
Walter
Aug 20, 2004
Vathix
Aug 20, 2004
Matthew
Aug 20, 2004
Walter
Aug 20, 2004
Matthew
Aug 20, 2004
Daniel Horn
Aug 20, 2004
Matthew
Aug 20, 2004
Walter
Aug 20, 2004
Matthew
Aug 20, 2004
Walter
Aug 20, 2004
Sean Kelly
Aug 20, 2004
Sean Kelly
Aug 20, 2004
antiAlias
Aug 20, 2004
Matthew
Aug 20, 2004
antiAlias
Accreting Mango's HashMap
Aug 20, 2004
Matthew
Aug 20, 2004
Walter
Aug 20, 2004
Sean Kelly
Aug 20, 2004
Matthew
Aug 21, 2004
Walter
Aug 27, 2004
Sean Kelly
Aug 20, 2004
antiAlias
Aug 20, 2004
Walter
Aug 20, 2004
Sean Kelly
Aug 20, 2004
Matthew
Aug 20, 2004
Sean Kelly
Static constructor order (was Re: Accreting Mango's HashMap)
Aug 20, 2004
antiAlias
Aug 20, 2004
Sean Kelly
Aug 22, 2004
Walter
Aug 22, 2004
Walter
Aug 21, 2004
Gold Dragon
Aug 21, 2004
Sean Kelly
Aug 21, 2004
Sean Kelly
Aug 20, 2004
Matthew
Aug 20, 2004
Ben Hinkle
Aug 20, 2004
pragma
Aug 20, 2004
Ben Hinkle
Aug 20, 2004
clayasaurus
Aug 20, 2004
Matthew
Aug 20, 2004
clayasaurus
Aug 20, 2004
clayasaurus
Aug 20, 2004
Matthew
Aug 20, 2004
Russ Lewis
Aug 21, 2004
David L. Davis
August 20, 2004
Lots more bug fixes. Added special 'length' inside array [ ]'s.

http://www.digitalmars.com/d/changelog.html


August 20, 2004
In article <cg3n60$2oap$1@digitaldaemon.com>, Walter says...
>
>Added special 'length' inside array [ ]'s.
>

meaning ? ... (example please)


August 20, 2004
"kinghajj" <kinghajj_member@pathlink.com> escribió en el mensaje
news:cg3oju$2p20$1@digitaldaemon.com
| In article <cg3n60$2oap$1@digitaldaemon.com>, Walter says...
||
|| Added special 'length' inside array [ ]'s.
||
|
| meaning ? ... (example please)

Look for "Array Length" in arrays.html:

"Within the [ ] of a static or a dynamic array, the variable length is implicitly declared and set to the length of the array."

-----------------------
Carlos Santander Bernal


August 20, 2004
On Fri, 20 Aug 2004 02:45:18 +0000 (UTC), kinghajj wrote:

> In article <cg3n60$2oap$1@digitaldaemon.com>, Walter says...
>>
>>Added special 'length' inside array [ ]'s.
>>
> 
> meaning ? ... (example please)

char[] myarray = "abcdefghij";

writef(myarray[length-3 .. length ]

output ==> "hij"

-- 
Derek
Melbourne, Australia
20/Aug/04 12:47:50 PM
August 20, 2004
Walter wrote:

> Lots more bug fixes. Added special 'length' inside array [ ]'s.
> 
> http://www.digitalmars.com/d/changelog.html

I don't suppose there's any way to get that sugar for things that implement opIndex, opSlice, etc. Or that that work already? I'm thinking that if x is an instance of class Foo and Foo defined opIndex and length() then x[length-1] is the same as x.opIndex(x.length-1).

August 20, 2004
In article <cg3or0$2p3k$1@digitaldaemon.com>, Derek Parnell says...
>
>On Fri, 20 Aug 2004 02:45:18 +0000 (UTC), kinghajj wrote:
>
>> In article <cg3n60$2oap$1@digitaldaemon.com>, Walter says...
>>>
>>>Added special 'length' inside array [ ]'s.
>>>
>> 
>> meaning ? ... (example please)
>
>char[] myarray = "abcdefghij";
>
>writef(myarray[length-3 .. length ]
>
>output ==> "hij"
>
>-- 
>Derek
>Melbourne, Australia
>20/Aug/04 12:47:50 PM

Oh, ok, that's cool!


August 20, 2004
"Ben Hinkle" <bhinkle4@juno.com> wrote in message news:cg3oug$2ond$1@digitaldaemon.com...
> Walter wrote:
>
> > Lots more bug fixes. Added special 'length' inside array [ ]'s.
> >
> > http://www.digitalmars.com/d/changelog.html
>
> I don't suppose there's any way to get that sugar for things that
implement
> opIndex, opSlice, etc. Or that that work already? I'm thinking that if x
is
> an instance of class Foo and Foo defined opIndex and length() then
> x[length-1] is the same as x.opIndex(x.length-1).

That does need to be done. I was thinking that an implicit 'with' statement could happen, and then all the members of the class instance would be usable.


August 20, 2004
> Added special 'length' inside array [ ]'s.
>

I think it's pretty cool, but might cause logic bugs. I'm just glad I've been lazy in naming my variables len instead of length. Perhaps it should be illegal to name something length, and just allow classes/structs/unions to have an opLength() ? It would also be helpful for people porting from another language. length is a pretty popular name.


August 20, 2004
>Added special 'length' inside array [ ]'s.

Excellent. I really can't imagine this causing more than a very few faltering steps for each developer, and a considerable, albiet sugary, syntactic simplification.

Now, how do I go about raising the issue of D providing thread-agnostic implicit reg-exp, a la Perl and Ruby?

(I'm not kidding!)



August 20, 2004
"Ben Hinkle" <bhinkle4@juno.com> wrote in message news:cg3oug$2ond$1@digitaldaemon.com...
> Walter wrote:
>
> > Lots more bug fixes. Added special 'length' inside array [ ]'s.
> >
> > http://www.digitalmars.com/d/changelog.html
>
> I don't suppose there's any way to get that sugar for things that implement opIndex, opSlice, etc. Or that that work already? I'm thinking that if x is an instance of class Foo and Foo defined opIndex and length() then x[length-1] is the same as x.opIndex(x.length-1).

I never considered that that was _not_ the case. Please say that is indeed how it works, big-W.

If not, count this a loud vote for that consistency. :)



« First   ‹ Prev
1 2 3 4 5 6