HP Forums
CAS/Home buggy - 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: CAS/Home buggy (/thread-11908.html)



CAS/Home buggy - toshk - 12-05-2018 11:09 PM

#pragma mode( separator(.,Wink integer(h32) )
EXPORT zlines(ybuss)
BEGIN
local lnedata,linedat,ttalbuses,zp;
local a,b,c,d,q,M11;
ttalbuses:= SIZE(mat2list(col(ybuss,1)));
a:=col(ybuss,1);
lnedata:=transpose(ybuss);
linedat:=sum(lnedata);
b:=length(linedat);
return ({ttalbuses,a,lnedata,linedat,b});
END;

Home run;
zlines([[0.166666666667,−0.166666666667,0],[−0.166666666667,0.277777777778,−0.111111111111],[0,−0.111111111111,0.311111111111]])
correct answer={3,[0.166666666667,−0.166666666667,0],[[0.166666666667,−0.166666666667,0],[−0.166666666667,0.277777777778,−0.111111111111],[0,−0.111111111111,0.311111111111]],[0,0,0.2],3}

CAS run;
zlines([[0.166666666667,−0.166666666667,0],[−0.166666666667,0.277777777778,−0.111111111111],[0,−0.111111111111,0.311111111111]])
buggy answer={50,'tran',tran(ybuss),"prodsum Error: Bad Argument Value",1} ??


RE: CAS/Home buggy - toml_12953 - 12-06-2018 02:31 AM

(12-05-2018 11:09 PM)toshk Wrote:  #pragma mode( separator(.,Wink integer(h32) )

Your semi-colon followed by a right parenthesis looks like a winking smiley face when rendered by this forum!

; ) Wink


RE: CAS/Home buggy - grsbanks - 12-06-2018 08:43 AM

Place the lot in "code" tags and that should solve the problem:

Code:
#pragma mode( separator(., ;, integer(h32) )
EXPORT zlines(ybuss)
BEGIN
local lnedata,linedat,ttalbuses,zp;
local a,b,c,d,q,M11;
ttalbuses:= SIZE(mat2list(col(ybuss,1)));
a:=col(ybuss,1);
lnedata:=transpose(ybuss);
linedat:=sum(lnedata);
b:=length(linedat);
return ({ttalbuses,a,lnedata,linedat,b});
END;