[SOLVED] LNAME - exctracting variables from stringed expression?
|
01-16-2017, 02:46 PM
Post: #5
|
|||
|
|||
RE: [SOLVED] LNAME - exctracting variables from stringed expression?
(01-16-2017 11:41 AM)DrD Wrote: Summary: #1: I wonder if this is incomplete documentation. There are two commands: lname and LNAME that do similar things. In Home view, you need to provide an unevaluated expression to LNAME. #2: LNAME can return any type of variable: non-reserved, reserved, even app names and local names from within programs. #3: Pre-existing variables are fine. Use a quoted expression to force non-evaluation. LNAME('X+Y') will return { X, Y } in the Home screen. Typing in LNAME('X+Y') vs lname('X+Y') in the CAS view will net different results (probably due to differences in how each view passes parameters to the other view; or it could simply be a bug). Generally speaking, use uppercase in Home view and lowercase in CAS view for command names. #4: Not "can" but "will" -- this is a guaranteed behavior. I am unaware of any instance in which this is not the case, but I have been wrong on many occasions (and quite possibly more often than not when it comes to the CAS). The CAS() command takes as its argument the content of the string and always evaluates the content. Evaluating CAS("x+2*y-3") is the same as literally typing x+2*y-3 in the command line while in CAS view (and the command line necessarily evaluates what was entered). To get an unevaluated expression, quote the content: CAS(" 'x+2*y-3' "). Quoted expressions are still evaluated -- effectively, their quotes are stripped. Graph 3D | QPI | SolveSys |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
[SOLVED] LNAME - exctracting variables from stringed expression? - chromos - 01-16-2017, 09:34 AM
RE: LNAME - exctracting variables from stringed expression? - DrD - 01-16-2017, 11:41 AM
RE: [SOLVED] LNAME - exctracting variables from stringed expression? - Han - 01-16-2017 02:46 PM
RE: LNAME - exctracting variables from stringed expression? - Didier Lachieze - 01-16-2017, 12:23 PM
RE: LNAME - exctracting variables from stringed expression? - chromos - 01-16-2017, 12:38 PM
RE: [SOLVED] LNAME - exctracting variables from stringed expression? - DrD - 01-16-2017, 03:05 PM
RE: [SOLVED] LNAME - exctracting variables from stringed expression? - DrD - 01-16-2017, 03:33 PM
|
User(s) browsing this thread: 1 Guest(s)