Post Reply 
CAS-> Variable() warning msg?
11-01-2014, 01:13 PM
Post: #11
RE: CAS-> Variable() warning msg?
(11-01-2014 12:48 PM)DrD Wrote:  True, this example fails; but using variable 'x' is troublesome in the quoted example. If you use a different variable, say 'n', as the independent variable instead, the above works fine. Using 'x' in the defining expression, then using 'x' again as an independent variable, is asking for trouble. The independent 'x' became a pointer to the list 'x', in expression involving x^2. Using 'n' has no particular relationship to 'x^2'. I don't think that counts as a fail in this case.

This is precisely the point of the example. That is, when you create a proper function, the 'x' in the function is just a dummy variable. So if one subsequently defines 'x' it does not affect the behavior of the function. On the other hand, creating an expression and expecting it to work like a function (even if it does work most of the time) is a bad idea of one intends to use the expression as an actual function because there will be instances when such expected behavior breaks.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
CAS-> Variable() warning msg? - DrD - 10-31-2014, 09:36 AM
RE: CAS-> Variable() warning msg? - DrD - 10-31-2014, 01:03 PM
RE: CAS-> Variable() warning msg? - Han - 10-31-2014, 03:42 PM
RE: CAS-> Variable() warning msg? - DrD - 10-31-2014, 04:39 PM
RE: CAS-> Variable() warning msg? - Han - 10-31-2014, 05:00 PM
RE: CAS-> Variable() warning msg? - DrD - 10-31-2014, 05:17 PM
RE: CAS-> Variable() warning msg? - Han - 10-31-2014, 11:04 PM
RE: CAS-> Variable() warning msg? - DrD - 11-01-2014, 12:48 PM
RE: CAS-> Variable() warning msg? - Han - 11-01-2014 01:13 PM
RE: CAS-> Variable() warning msg? - DrD - 11-01-2014, 01:25 PM



User(s) browsing this thread: 2 Guest(s)