Post Reply 
problems in INPUT CMD [Matrix editing and symbol expr, ...]
03-14-2017, 07:24 PM (This post was last modified: 03-21-2017 03:24 PM by compsystems.)
Post: #1
problems in INPUT CMD [Matrix editing and symbol expr, ...]
Hello

please copy/paste the following code (HP-P CK) execute, and follow the steps below to check the failures.

PHP Code:
export unitVarstrVar;
export inputTypes()
BEGIN
  local ObjectType_All 
:= -1;
  
local ObjectType_Real := 0;
  
local ObjectType_Integer := 1;
  
local ObjectType_String := 2;
  
local ObjectType_Complex := 3;
  
local ObjectType_Matrix := 4;
  
local ObjectType_Error := 5
  
local ObjectType_List := 6;
  
local ObjectType_SymbolicExpression := 8;
  
local ObjectType_Unit := 9

  
L1 := { 1.5#FFFh, "X \"2\" Y", 3+4*i, "5", [[ 1, 3+4*i ],[ #FFFh, 3°05′06″ ]], { { 'Y=X^2', 'Y=2*X+3' },(5∡53), [ 3,4 ] }, 'X^2^Y^Z^W', 3_m, 3°05′06″, (3,4), "pi+3", 'X' };  
  
if(
    
input
    

    {
    { 
L1(1), [ ObjectType_Real ] }, 
    { 
L1(2), [ ObjectType_Integer ] },
    { 
L1(3), [ ObjectType_String ] }, 
    { 
L1(4), [ ObjectType_Complex ] },  
    { 
L1(6), [ ObjectType_Matrix ] }, 
    { 
L1(7), [ ObjectType_List ] },
    { 
L1(8), [ ObjectType_SymbolicExpression ] },
    { 
L1(9), [ ObjectType_Unit ] },
    { 
L1(10), [ ObjectType_Real ] }, 
    { 
L1(11), [ ObjectType_Complex ] },
    { 
L1(12), [ ObjectType_All ] },
    { 
L1(13), [ ObjectType_SymbolicExpressionObjectType_Real ] }  
    },
    { 
"Data Types page 1/2","Data Types page 2/2" },
    { 
"Real:""Binary Integer:""String:""Complex:""Matrix:""List:""SymExpr:""Unit:""Real (Angle)""Complex (x,y)""Any""Real or SymbExpr" },
    {},
    { 
5/3#10h, char(64), (5∡53), [ e^1, pi/2 ], { {1, 2}, 5 mod 3 }, 'Y=X^2', 3.1_m, 3°, e^1, "e", 'Y' }

    
)
   ) 
   
then
  
    A
:=L1(1);  
    
B:=L1(2);
    
strVar:=L1(3);
    
Z1:=L1(4);
    
M1:=L1(6);
    
L2:=L1(7);
    
L3:=L1(7,1);
    
E1:=L3(1);
    
E2:=L3(2);
    
F1:=L1(8);
    
unitVar:=L1(9);
    
C:=L1(10);
    
Z2:=L1(11);
    
IFERR F2:=L1(12);
    
THEN
    END
;
    
IFERR F3:=L1(13);
    
THEN
    END
;

    return(
L1);
   
end;
END

1: in the "SymExpr" (Last field of the first page) or "Matrix" field (field #5) , when editing a matrix or symbolic expression only one line appears, it should be shown in n lines, Otherwise it is very difficult to edit

2: If you enter a data type that does not match the specified type, is deleted from the edit line it must be kept for editing

3: The string ("X \"2\" Y") is displayed as (X ""2"" Y), request Include "" external containers when edit a string object, with the purpose of differentiate from other types of data ("X "2" Y")

4: in the last field "Real or SymbExpr" (second page) , there is a problem, it does not recognize the 2 data types, (symbolic expressions), if you enter 'X^2' -> "Error: Invalid Input"

5: 'X' is evaluated to 0 (Must be enclosed in quotation marks.), Press [shift]+[esc] for reset all values of the second page
Find all posts by this user
Quote this message in a reply
03-16-2017, 01:25 AM
Post: #2
RE: failures in INPUT CMD
All failures? Do you know how to properly use these features as they were designed?
Find all posts by this user
Quote this message in a reply
Post Reply 




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