Post Reply 
this short program crashes my PRIME
12-18-2013, 12:06 AM
Post: #1
this short program crashes my PRIME
Code:

EXPORT ELODIFF(R)
BEGIN
LOCAL LI,I,A,B,C;
LI:={
{0,3,0.5},{4,10,0.51},{11,17,0.52},
{18,25,0.53},{26,32,0.54},{33,39,0.55},
{40,46,0.56}
};
FOR I FROM 1 TO SIZE(LI) DO
A:=LI(I,1);
B:=LI(I,2);
C:=LI(I,3);
 IF ((R≥A)  AND (R≤B)) THEN
  RETURN (C);
  KILL;
 END;
END;
RETURN 0;
END;

First time it returns right answer, e.g.:
ELODIFF(15)=.52 //this what I need
Second time I get:
ELODIFF(15)=15 //something gets wrong...
After several callings with different arguments my HP PRIME CRASHES...
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
this short program crashes my PRIME - Marek Russ - 12-18-2013 12:06 AM



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