Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Checking dynamically updated variable' topicStudent Support Forum > General > Archives > "Checking dynamically updated variable"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Michael
01/13/13 9:41pm

In Response To 'Re: Re: Re: Checking dynamically updated variable'
---------
Try it this way:

Clear[x];
InputField[Dynamic[x]] // Print;
f = Compile[{{x}}, x^2];

If[NumberQ[x], f[x]] // Dynamic


The problem is with

If[NumberQ[x], f[x] // Print ] // Dynamic

I'm afraid I don't know the explanation. The cell that Print creates appears in the console (on my system). Where Print appears is supposed to be controllable in the preferences, but no matter which notebook I set as the output for Print, it appears in the console "Messages".

(Somehow I've never cared much for Print. Seems like a relic of V1. Suitable for command-line interfaces. I hardly ever use it, especially nowadays with all the options for monitoring a program. Hence my ignorance.)

URL: ,

Subject (listing for 'Checking dynamically updated variable')
Author Date Posted
Checking dynamically updated variable PhysicsGuy 01/08/13 10:18pm
Re: Checking dynamically updated variable Michael 01/09/13 3:47pm
Re: Re: Checking dynamically updated variable PhysicsGuy 01/09/13 9:05pm
Re: Checking dynamically updated variable PhysicsGuy 01/09/13 11:55pm
Re: Re: Checking dynamically updated variable Michael 01/10/13 4:15pm
Re: Checking dynamically updated variable PhysicsGuy 01/10/13 7:29pm
Re: Re: Checking dynamically updated variable Michael 01/11/13 9:29pm
Re: Re: Re: Checking dynamically updated variable PhysicsGuy 01/12/13 8:18pm
Re: Re: Re: Re: Checking dynamically updated va... Michael 01/13/13 9:41pm
< Previous CommentHelp | Reply To Comment | Reply To Topic