HS

35 Reputation

3 Badges

0 years, 334 days

MaplePrimes Activity


These are questions asked by HS

How do I get the line number of where the error occurred? 
The errors messages in maple tell you nothing.

p.s. How do I get the debugger to keep the display of code after it hits an error? 
 Where does the copy results on exit copy to? 
How do I know where I am in the code? (e.g. the matlab debugger just goes into the code you wrote  but when do outfrom it's not clear where I am now  )
How do I view variable values whilst debugging? How do I quit the debugger and save variables?  Can I set a procedure to quit and return variables? 

can I set a break in a procedure to quit and keep variable values?

###(*         test code 
test:=proc(aa,bb)

P1:=1; 
P2:=2;  

    P1:=aa; 
    P2:=bb;
 
f:=x^3+x+2;
p:=13; 
k:=2;
tmp:=field(p,k);
q:=tmp[1];
Po:=tmp[2];
L1:=P1; 
L2:= P2;
m:=1; 
while (L1 <> infinity) and (m < 25 ) do
temp:= EAdd(f, x, p, P1,P2,L1,L2) ;
L1:=temp[1];
L2:=temp[2];
m:=m+1;
end;

return 0;
end proc ;
#    *)


stopat(test, 24);

Error, (in stopat) statement number out of range  

Line 24 is the line after m:=m+1 so why is it out of range???

Sorry if this is stupid but How do I use the interactive debugger?   the button is greyed out for me and 
 

stopat(EAdd(x^3+2x+1,x, 13, 1, 2, 1, 2), 1);

Error, missing operator or `;`

 

stopat(EAdd, 1);

                             [EAdd]
 

debug button is still greyed out IDK what to do now


p.s. is there a way to set breakpoints in your code by clicking like in other programming?
 

I don't understand whats wrong with my code
r(x):=proc(x) 
    local y
    if (x=1)
    then    
    y=1;
    else 
        y=0;
    end if; 
    return y
    end proc    

Error, reserved word `if` unexpected

I'm also having trouble getting this code to work:

h(x):=proc(x) 
    if (x= infinity)
    then    
    return 1 ;
    else 
        return 0;
        end if; 
    end proc 
theres no error but h(0) just returns h(0) not either value as I would like

Why do I get an error here?

G := GF(2, 3, T^3+T^2+1);


G:-`*`(T, T);
Error, (in *) modp1: invalid arguments to function Multiply

p.s. how do I specify what variable is used for my finite field without needing to specify an irreducible polynomial?

1 2 3 4 Page 2 of 4