Implies operator
Stewart Gordon
smjg_1998 at yahoo.com
Tue Nov 14 16:15:52 PST 2006
Hasan Aljudy wrote:
> Mariano wrote:
<snip>
>> but the implication makes it far more clear for common day speach
>>
>> if( check_boundaries -> a.length <= max_int )
>> process(a);
>>
>> makes more sence than
>>
>> if( !check_boundaries || a.length <= max_int )
>> process(a);
>
> What does that mean? what's 'a' and what's 'check_boundaries'?
Presumably it's obvious within the context from which the example has
been snipped.
What this notation is saying is: If check_boundaries is true, then we
need to check whether a.length <= max_int - otherwise we needn't bother.
But still, it isn't exactly the clearest notation.
<snip>
> Yea, it's easy, sure .. but -> has another totally different meaning in
> C++. Not that I care about C++ anymore, but D, being a C-family
> language, IMHO, shouldn't do this.
<snip>
Taken the words out of my mouth there.
Stewart.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:-@ C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS-
PE- Y? PGP- t- 5? X? R b DI? D G e++++ h-- r-- !y
------END GEEK CODE BLOCK------
My e-mail is valid but not my primary mailbox. Please keep replies on
the 'group where everyone may benefit.
More information about the Digitalmars-d
mailing list