if(!☕) { cup.refill(); }; correct?

Discussion in 'Off-Topic' started by emapra, Dec 22, 2019.

  1. emapra

    emapra

    Joined:
    Dec 22, 2019
    Messages:
    1
    Likes Received:
    0
    Hi there!

    I recently found a t-shirt with the following phrase:
    if(!☕) {
    cup.refill();
    };

    But is this even correct? I have to admit I do not have much experience in coding. But isn't the information missing that the cup is empty? Or does the call sign imply that?

    Sorry for my newbish questions but I'm considering to buy this for a friend's birthday and have to be sure that it's correct like that.
     

    Attached Files:

    emapra, Dec 22, 2019
    #1
    1. Advertisements

  2. emapra

    John Joe

    Joined:
    Apr 25, 2017
    Messages:
    131
    Likes Received:
    15
    Location:
    Malaysia
    I think it can be interpreted two way:

    1. If there has no coffee (cup is empty), call the refill method
    2. If there is not a coffee

    I guess the phrase is more on 1st sentence.
     
    John Joe, Dec 23, 2019
    #2
    1. Advertisements

  3. emapra

    sunfighter

    Joined:
    Nov 27, 2019
    Messages:
    34
    Likes Received:
    6
    sunfighter, Dec 23, 2019
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.