Thread: how do u explain this in english words

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    26

    how do u explain this in english words

    how do u explain this
    void Rectangle::setLength( double l )
    {
    length = l > 0 && l < 20.0 ? l : 1.0;
    }
    C++ Is cool

  2. #2
    Registered User Cela's Avatar
    Join Date
    Jan 2003
    Posts
    362
    If l is greater than 0 and less than 20, return l, otherwise return 1 :-)
    *Cela*

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    i THINK its u could say:

    is lenght between 0 and 20
    if not l is equal to 1
    ?? am i right ??

  4. #4
    Registered User
    Join Date
    Sep 2002
    Posts
    272
    >otherwise return 1 :-)

    Return what?

    let length equal l if l is greater than zero and less than twenty but if l is less than or equal to zero or greater than or equal to twenty let length equal one.
    Last edited by JoeSixpack; 02-10-2003 at 05:49 PM.
    Joe

  5. #5
    Registered User
    Join Date
    Oct 2002
    Posts
    26
    thanks a lot i understand now what i am doing
    C++ Is cool

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Begginer Problem: Extracting words from sentence
    By barlas in forum C++ Programming
    Replies: 5
    Last Post: 05-04-2006, 03:17 PM
  2. New Theme
    By XSquared in forum A Brief History of Cprogramming.com
    Replies: 160
    Last Post: 04-01-2004, 08:00 PM
  3. Sorting words with a fast, effincient sorting method
    By Unregistered in forum C++ Programming
    Replies: 19
    Last Post: 07-12-2002, 04:21 PM
  4. counting words in string
    By Unregistered in forum C Programming
    Replies: 9
    Last Post: 05-30-2002, 04:10 AM