Testing for ASCII values?

This is a discussion on Testing for ASCII values? within the C Programming forums, part of the General Programming Boards category; I am looking for a function that would ONLY allow the user to enter integers (0-9) ascii values 48-57. I ...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    22

    Testing for ASCII values?

    I am looking for a function that would ONLY allow the user to enter integers (0-9) ascii values 48-57. I have looked everywhere I know and even asked some other friends of mine but no one has any idea. If someone can offer any kind of help, I would greatly appreciate it. I have not started on the function because I do not know where to start.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,762
    isdigit - in ctype.h

    This is for reading single characters '0' to '9', not whole numbers like 12345

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. disposing error
    By dropper166 in forum C# Programming
    Replies: 2
    Last Post: 03-31-2009, 12:53 AM
  2. Replies: 2
    Last Post: 11-19-2008, 02:36 PM
  3. Struct Values
    By Muphin in forum C++ Programming
    Replies: 5
    Last Post: 08-13-2005, 10:24 PM
  4. need some advice on displaying values
    By rEtard in forum Windows Programming
    Replies: 7
    Last Post: 06-16-2005, 10:55 AM
  5. Computing Large Values
    By swbluto in forum C++ Programming
    Replies: 8
    Last Post: 04-07-2005, 04:04 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21