Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Untillian Headache or about the semantic of until

by tmharish (Friar)
on Feb 11, 2013 at 14:10 UTC ( #1018151=note: print w/replies, xml ) Need Help??

in reply to Untillian Headache or about the semantic of until

I cant say much about the semantics of until in the context that you have described it as neither English nor Italian are my native languages.

However I believe that the use of until and unless and the likes are dangerous for precisely this reason. I find it far better to use while( ! ) and if(!) for complex conditions.

Regarding the negation - You need to use De Morgan's laws for that negation. It essentially states:

NOT( A OR B ) <==> NOT(A) AND NOT(B) NOT( A AND B ) <==> NOT(A) OR NOT(B)

NOT( ($odometer[$wheel] < 9 || $wheel < 0) ) ==> NOT($odometer[$wheel] < 9 ) AND NOT ($wheel < 0) ==> $odometer[$wheel] >= 9 AND $wheel >= 0

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018151]
choroba's friend has done the Pacific Crest Trail, it's 4200 km
LanX Ladies and gentlemen: due to shortages of "Body of Christ" we have to resort to Body of Monks ...
LanX ... buon appetito!
[LanX]: Pacific Crest Trail is really hard stuff
[Eily]: erix he plans to go as far as leuca
[erix]: ah, that's really down at the heel point :)
[Eily]: LanX how dare you imply that I made a typo? It's true but still!
[Eily]: or is it a typo if the mistake was in my brain rather than in the process of typing?
[LanX]: they were talking about meatspace recently ...
[choroba]: a "thinko"

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2017-12-13 15:14 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (369 votes). Check out past polls.