delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/14/14:59:19

From: anfamily AT sprintmail DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: checking types
Date: Sat, 13 Sep 1997 15:00:02 -0700
Organization: An Family
Lines: 10
Message-ID: <341B0CE1.29B0@sprintmail.com>
Reply-To: anfamily AT sprintmail DOT com
NNTP-Posting-Host: sdn-ts-003capaltp16.dialsprint.net
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

How would you check a variable to make sure it's a certain data type you
want it to be?  I have a small prog, that needs this.  It prompts you
for an integer, but you can enter other types.  If you enter other
types, if really screws up the prog.  I'm using a scanf to get that
value for a variable, but after that, I want to check to make sure the
value in that variable is a integer.  If it's not, it would prompt the
user again.  How would I do that?
-- 
(~_Ionicis_~)
http://www.geocities.com/SiliconValley/Bay/2306/ <--- Go here!

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019