The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Strange miracles and wonders happen on the latest Vir Calc ver 2018 10 16
11-01-2018, 03:22 AM
Post: #1
Strange miracles and wonders happen on the latest Vir Calc ver 2018 10 16
I was trying to use size command in a program and when I used size({list}) it returned integer, but when I used size([vector]) i got {some integer}. Should not size for 1D lists/vectors return just an integer? After farther investigation I tried to see what is really going on and in a simple prgm:

EXPORT test(a1,a2)
BEGIN
local s1:=size(a1), s2:=size(a2);
return(s1,s2);
END;

I am getting the answer {3+2*i} , complex number where a1:={1,2,3}, a2:={1,2} or a1:=[1,2,3] and a2:=[1,2], it does not matter if a1 and/or a2 are lists with {} or with [].

When I change the prgm test to:
EXPORT test(a1,a2)
BEGIN
local s1:=size(a1), s2:=size(a2);
local out;
out:=[s1,s2];
return(out);
END;
and test({1,2},[1,2,3,4]} I get "Error: Invalid input", but when test({1,2},{1,2,3,4} I get [2,4]. Changing in test() out:=[,] to out:={s1,s2} gives the ans {numb,{numb}}, if for ex a1:={{...} and a2:=[...]. I hope somebody at HP or not should fix those inconsistencies: for 1D vector the return should be an integer and for 2D matrices the return should be {int1,int2} or [int1,int2] but not both mixed up and different for {2D} and [2D].

On top on that: using the latest Virtual Calc ver. 2018 10 16, the keys on my laptop get confuse for ex. the Backspace deletes to the right instead of to the left, the ENTER key as well does some strange 'magic' on VC. Hey, guys at HP what is going on? Is anybody out there in control or we are on autopilot?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Strange miracles and wonders happen on the latest Vir Calc ver 2018 10 16 - John P - 11-01-2018 03:22 AM



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