MathGroup Archive 2009

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

Search the Archive

strange behavior

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104787] strange behavior
  • From: Jason Winters <Jason_member at nntpjunkie.com>
  • Date: Tue, 10 Nov 2009 05:58:05 -0500 (EST)

Hi!  I am wondering why these two modules behave differently


Module[{ans = ""},
  For[i = 1, i < 10, i++,
    ans = InputString["Enter a String"];
    Print[ans]
    ]
  ]


and


Module[{ans = ""},
  For[i = 1, i < 10, i++,
    ans = InputString["Enter a String"]
    Print[ans]
    ]
  ]


One prints out a bunch of extraneous Null's

Also is there anyway to type variable in Mathematica  i.e. declare i to be and
integer or string or whatever.


Thanks for any help you can give.  
Sorry for the simpleness of these questions.

Thanks



  • Prev by Date: How to Calculatelength of an Spline curve between two points?
  • Next by Date: Re: Bug? ver4
  • Previous by thread: Re: Re: How to Calculatelength of an Spline curve between
  • Next by thread: Re: strange behavior