Thread: how defined an negative number

  1. #1
    Registered User
    Join Date
    Oct 2012
    Posts
    11

    how defined an negative number

    hello everyone
    i nead to define an a negative number
    a normal posetive number i defined like
    #define RSSI_UP 1

    can i write
    #define RSSI_DOWN -1???

    thanx

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Sounds good - go for it.
    Let us know how it goes.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,907
    You might want to share a bit more information on what your problem is.

    Otherwise, as Salem says,
    Sounds good - go for it.
    Let us know how it goes.
    Fact - Beethoven wrote his first symphony in C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [question]unsigned number with negative value?
    By learn in forum C Programming
    Replies: 2
    Last Post: 12-27-2009, 12:00 AM
  2. Read until negative number
    By m_user in forum C Programming
    Replies: 10
    Last Post: 04-03-2009, 06:38 AM
  3. How can i convert negative number to positive number ?
    By winsonlee in forum C Programming
    Replies: 2
    Last Post: 05-05-2004, 08:02 AM
  4. random number between negative and positive number
    By anomaly in forum C++ Programming
    Replies: 6
    Last Post: 12-06-2003, 08:40 AM
  5. how to read in a negative number using cin
    By revelation437 in forum C++ Programming
    Replies: 4
    Last Post: 04-02-2003, 02:32 PM