[HELP] Understanding the operation of CAS object types - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: [HELP] Understanding the operation of CAS object types (/thread-7364.html) |
[HELP] Understanding the operation of CAS object types - compsystems - 12-04-2016 08:09 PM HELLO "type" HELP SAYS Quote:Syntax: type(Expr)EVAL(DOM_STRING) returns 12 "TYPE" HELP SAYS Quote:Syntax: I do not understand 14. # someone knows an example? A program that shows the output of (TYPE versus type) commands, if you know the example for types (3,5,9,...) please inform me type cmd PHP Code: #cas TYPE cmd PHP Code: EXPORT TYPES() RE: CAS object (Help with TYPE cmd) - compsystems - 12-04-2016 09:50 PM The sentence inside "TYPES" prg does not work. Why? PHP Code: print("❑Function: TYPE(f(x):=x+3))-> "+TYPE(CAS::(f:=(x)->x+3))) RE: CAS object (Help with TYPE cmd) - Han - 12-05-2016 12:10 AM (12-04-2016 09:50 PM)compsystems Wrote: The sentence inside "TYPES" prg does not work What is CAS::(f:=(x)->x+3) ? There is no such construct in HPPL. The CAS command is invoked with CAS() or CAS.function() and not CAS::(). Use: TYPE(CAS("f:=(x)->x+3")) RE: - compsystems - 12-05-2016 02:29 PM HOME MODE X (defined variable to 0), x -> "Syntax Error" (best undefined variable) case1: Why only capital X is valid as a symbolic variable? If the CAS command tells it to operate as symbolic arg. TYPE CMD & CAS.() CMD TYPE( CAS.( f(X):=X+3 )) [ENTER] returns 8 // X uppercase & TYPE( CAS.( f(x):=x+3 )) -> "Syntax Error" Why? // x lowercase type CMD & CAS.() CMD type( CAS.( f(X):=X+3 )) -> 8 type( CAS.( f(x):=x+3 )) -> "Syntax Error" Why? / ---------------------------------- case2: Within a chain is indifferent X or x TYPE CMD & CAS( "" ) CMD TYPE( CAS( "f(X):=X+3" )) -> 8 // X uppercase TYPE( CAS( "f(x):=x+3" )) -> 8 // x lowercase type CMD & CAS( "" ) CMD type( CAS( "f(X):=X+3" )) -> 8 type( CAS( "f(x):=x+3" )) -> 8 ---------------------------------- case3: TYPE CMD TYPE( f(X):=X+3 ) -> 8 // // X uppercase TYPE( f(x):=x+3 ) -> "Syntax Error" Why? / // x lowercase type CMD type( f(X):=X+3 ) -> 2 ?? type( f(x):=x+3 ) -> "Syntax Error" Why? / CAS MODE TYPE( CAS( "f(X):=X+3" )) -> "Error: Unmatch control word" TYPE( CAS( "f(x):=x+3" )) -> "Error: Unmatch control word" TYPE( CAS.( f(X):=X+3 )) -> 8 TYPE( CAS.( f(x):=x+3 )) -> 8 TYPE( f(X):=X+3 ) -> "Error: Unmatch control word" TYPE( f(x):=x+3 ) -> "Error: Unmatch control word" type( CAS( "f(X):=X+3" )) -> DOM_SYMBOLIC Why? type( CAS( "f(x):=x+3" )) -> DOM_SYMBOLIC Why? type( CAS.( f(X):=X+3 )) -> DOM_IDENT Why? type( CAS.( f(x):=x+3 )) -> DOM_IDENT Why? type( f(X):=X+3 ) -> DOM_FUNC type( f(x):=x+3 ) -> DOM_FUNC ------ CAS:: () only CAS MODE TYPE( CAS.( f(X):=X+3 )) [ENTER] returns 8 [UP] [UP] [COPY] TYPE(CAS::(f:=(X)->X+3)) TYPE(CAS:: (f:=(X)->X+3)) -> 8 type( CAS.( f(X):=X+3 )) [ENTER] returns DOM_IDENT [UP] [UP] [COPY] TYPE(CAS:: (f:=(X)->X+3)) type( CAS:: (f:=(X)->X+3)) -> DOM_IDENT |