Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Beginner--Need to test and check real input values

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71564] Beginner--Need to test and check real input values
  • From: abdou.oumaima at hotmail.com
  • Date: Thu, 23 Nov 2006 05:41:35 -0500 (EST)

Hello Math Group,

I'm using While to control a flow of input values. I need to give a positive and real value to a variable, let's call it "c" . I write the code bellow but when I excute it, I can put a string value and can return it. How can I control that please.

c = 0;
While[! (RealQ[c] && 0 < c < 0.9), c = Input["Give a positive real value to c 
  less than 0.9"]]
Print["c= ", c]

Greetings.
Lian.

Link to the forum page for this post:
http://www.mathematica-users.org/webMathematica/wiki/wiki.jsp?pageName=Special:Forum_ViewTopic&pid=15555#p15555
Posted through http://www.mathematica-users.org [[postId=15555]]



  • Prev by Date: List of user-defined derivatives
  • Next by Date: Re: Pythonika: Python in Mathematica
  • Previous by thread: Re: List of user-defined derivatives
  • Next by thread: Re: Beginner--Need to test and check real input values