CAS command question
|
01-10-2017, 06:58 PM
Post: #71
|
|||
|
|||
RE: CAS command question
DrD: The CAS does not interact with hardware, and it shouldn't because that is not portable at all. As explained before, the CAS can parse a string to it's own internal data structures for representation of int, float, expressions, lists, operators, etc (a C structure named giac::gen for giac). This is what is called the parser (and it's not what Han calls parsing), more precisely this is a two phases step: the lexer finds words in the commandline and the parser applies grammar rules to build an expression. The CAS can also print it's internal data structures to strings. Strings are only used for communication with the outside world, everything else is done with giac::gen (and derivatives).
This is not limited to CAS, interpreters work the same way (CAS being special because variable may stay unassigned in expressions): when you type Enter after a commandline, the interpreter parses a string to an object, eval the object, print the result of evaluation (CAS programs are themselves expressions, they are eval-ed by exactly the same process). It's a fundemental CS concept, and that's why it should be teached to students for the same reason that writing a correct commandline, understanding priorities, parenthesis, etc. is universal and should be teached to students. Otherwise you will have users that are tighted to the only software they learned at school, because they did not learn the fundemental concepts that will make switching for them easy (and that's precisely what the big software companies want). |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)