Post Reply 
CAS command question
01-04-2017, 08:37 PM
Post: #21
RE: CAS command question
(01-04-2017 04:01 PM)Han Wrote:  Regarding your comment on the second case... I'm not sure I follow. The example I gave shows how to use strings and still not have it evaluate anything -- just add ' to the start and end of the string.

EDIT: I'm not sure to which of Arno K's comment you are referring, but if you are referring to his request to rename the commands, that would seem appropriate. The commands left and right behave more like "head" and "tail" (first and last arguments of an expression) for non-unary operators.

Second point by way of Example. Here is a linear programming problem:

p=3x+2y ==> Objective Function
s.t. 2x+3y<=12
2x+y<=8 ==> Constraints

Then as part of a program, the user is asked to key in each of those expressions. The program's input structure receives the above as a list of string objects:

L9:={"p=3x+2y","2x+3y<=12","2x+y<=8 "};

I was referring to:
CAS("left(CAS(L9(I)))"); where I is a loop variable, as being a straight forward way to parse left sides of each expression in the list, IF left() could be depended upon to yield the left side, which it can't, when the inequality sign is "<".

I think you were referring to:
The second case uses evaluation. left(CAS(" 'x+y<4' ")) will return x+y.
The distinction being the additional requirement for the single quotes.
(Apologies for the confusion).

Both of Arno K's comments are fitting, but I was referring to his first, "left is left, and right is right" comment. That says it all. The user solving the example problem would not need to be concerned about the intrinsic system level details, and can input the expressions as found, no need to worry about evaluation, format, or other internal concerns. Even more so, if tasked with creating a program solver for this example.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
CAS command question - DrD - 01-02-2017, 06:44 PM
RE: CAS command question - Arno K - 01-02-2017, 09:55 PM
RE: CAS command question - parisse - 01-03-2017, 07:24 AM
RE: CAS command question - DrD - 01-03-2017, 11:33 AM
RE: CAS command question - Han - 01-04-2017, 03:06 PM
RE: CAS command question - DrD - 01-04-2017, 03:46 PM
RE: CAS command question - Han - 01-04-2017, 04:01 PM
RE: CAS command question - DrD - 01-04-2017 08:37 PM
RE: CAS command question - Han - 01-05-2017, 02:07 AM
RE: CAS command question - matthiaspaul - 01-03-2017, 10:54 PM
RE: CAS command question - compsystems - 01-04-2017, 03:23 AM
RE: CAS command question - John P - 01-04-2017, 11:09 PM
RE: CAS command question - Arno K - 01-03-2017, 08:09 AM
RE: CAS command question - parisse - 01-03-2017, 04:42 PM
RE: CAS command question - parisse - 01-04-2017, 07:07 AM
RE: CAS command question - DrD - 01-04-2017, 11:19 AM
RE: CAS command question - Han - 01-04-2017, 02:46 PM
RE: CAS command question - compsystems - 01-04-2017, 12:56 PM
RE: CAS command question - DrD - 01-04-2017, 02:53 PM
RE: CAS command question - Han - 01-04-2017, 03:51 PM
RE: CAS command question - DrD - 01-04-2017, 03:32 PM
RE: CAS command question - compsystems - 01-04-2017, 05:08 PM
RE: CAS command question - parisse - 01-04-2017, 08:25 PM
RE: CAS command question - Arno K - 01-04-2017, 11:56 PM
RE: CAS command question - parisse - 01-05-2017, 07:46 AM
RE: CAS command question - Arno K - 01-05-2017, 08:54 AM
RE: CAS command question - DrD - 01-05-2017, 11:38 AM
RE: CAS command question - compsystems - 01-05-2017, 12:46 PM
RE: CAS command question - DrD - 01-05-2017, 02:28 PM
RE: CAS command question - Han - 01-05-2017, 04:49 PM
RE: CAS command question - DrD - 01-06-2017, 05:59 PM
RE: CAS command question - Han - 01-06-2017, 08:11 PM
RE: CAS command question - parisse - 01-05-2017, 07:31 PM
RE: CAS command question - compsystems - 01-05-2017, 08:08 PM
RE: CAS command question - Han - 01-05-2017, 09:07 PM
RE: CAS command question - Han - 01-05-2017, 09:20 PM
RE: CAS command question - Alberto Candel - 01-05-2017, 10:02 PM
RE: CAS command question - compsystems - 01-05-2017, 10:46 PM
RE: CAS command question - Alberto Candel - 01-05-2017, 11:05 PM
RE: CAS command question - Han - 01-05-2017, 11:53 PM
RE: CAS command question - chromos - 01-06-2017, 06:57 PM
RE: CAS command question - DrD - 01-06-2017, 08:28 PM
RE: CAS command question - Han - 01-06-2017, 08:37 PM
RE: CAS command question - John P - 01-08-2017, 11:15 PM
RE: CAS command question - parisse - 01-07-2017, 07:52 AM
RE: CAS command question - compsystems - 01-06-2017, 06:59 PM
RE: CAS command question - Han - 01-06-2017, 08:27 PM
RE: CAS command question - compsystems - 01-06-2017, 08:46 PM
RE: CAS command question - DrD - 01-07-2017, 11:25 AM
RE: CAS command question - parisse - 01-07-2017, 08:15 PM
RE: CAS command question - DrD - 01-07-2017, 10:54 PM
RE: CAS command question - DrD - 01-08-2017, 05:27 PM
RE: CAS command question - parisse - 01-09-2017, 06:43 AM
RE: - compsystems - 01-07-2017, 01:02 PM
RE: CAS command question - Dirk.nl - 01-07-2017, 09:32 PM
RE: CAS command question - parisse - 01-08-2017, 07:11 AM
RE: CAS command question - DrD - 01-08-2017, 09:47 AM
RE: CAS command question - compsystems - 01-08-2017, 04:17 PM
RE: CAS command question - DrD - 01-08-2017, 08:26 PM
RE: CAS command question - compsystems - 01-08-2017, 06:48 PM
RE: CAS command question - parisse - 01-09-2017, 04:43 PM
RE: CAS command question - DrD - 01-09-2017, 06:09 PM
RE: CAS command question - parisse - 01-09-2017, 06:58 PM
RE: CAS command question - Han - 01-09-2017, 07:29 PM
RE: CAS command question - DrD - 01-09-2017, 10:57 PM
RE: CAS command question - Han - 01-10-2017, 05:44 AM
RE: CAS command question - parisse - 01-10-2017, 07:58 AM
RE: CAS command question - DrD - 01-10-2017, 10:53 AM
RE: CAS command question - Han - 01-10-2017, 03:33 PM
RE: CAS command question - parisse - 01-10-2017, 06:58 PM
RE: CAS command question - Han - 01-10-2017, 09:14 PM
RE: CAS command question - compsystems - 01-10-2017, 08:26 PM
RE: CAS command question - parisse - 01-11-2017, 06:46 AM
RE: CAS command question - DrD - 01-11-2017, 02:18 PM
RE: CAS command question - Han - 01-11-2017, 08:19 PM
RE: CAS command question - parisse - 01-11-2017, 05:40 PM
RE: CAS command question - DrD - 01-12-2017, 11:14 AM
RE: CAS command question - Arno K - 01-12-2017, 12:44 PM
RE: CAS command question - parisse - 01-12-2017, 07:29 PM
RE: CAS command question - DrD - 01-12-2017, 08:44 PM
RE: CAS command question - Arno K - 01-12-2017, 10:11 PM
RE: CAS command question - parisse - 01-13-2017, 06:54 AM
RE: CAS command question - DrD - 01-13-2017, 10:52 AM
RE: CAS command question - Han - 01-13-2017, 03:12 PM
RE: CAS command question - DrD - 01-13-2017, 04:47 PM
RE: CAS command question - parisse - 01-13-2017, 09:18 PM
RE: CAS command question - DrD - 01-13-2017, 10:36 PM
RE: CAS command question - parisse - 01-14-2017, 06:44 AM
RE: CAS command question - compsystems - 01-14-2017, 02:40 AM
RE: CAS command question - DrD - 01-14-2017, 11:36 AM
RE: CAS command question - parisse - 01-14-2017, 12:25 PM
RE: CAS command question - compsystems - 01-14-2017, 01:05 PM
RE: CAS command question - DrD - 01-14-2017, 02:20 PM
RE: CAS command question - parisse - 01-14-2017, 07:27 PM
RE: CAS command question - DrD - 01-14-2017, 02:11 PM
RE: CAS command question - Dirk.nl - 01-14-2017, 02:46 PM
RE: CAS command question - Mark Hardman - 01-14-2017, 02:58 PM
RE: CAS command question - John P - 01-14-2017, 03:11 PM
RE: CAS command question - DrD - 01-14-2017, 03:17 PM
RE: CAS command question - Dirk.nl - 01-14-2017, 03:27 PM
RE: CAS command question - DrD - 01-15-2017, 09:30 AM
RE: CAS command question - compsystems - 01-14-2017, 03:31 PM
RE: CAS command question - compsystems - 01-15-2017, 01:28 AM



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