Post Reply 
Bug? or my error?
03-13-2016, 04:07 AM
Post: #1
Bug? or my error?
I have been spending some time trying to get the follow program (and several similar programs) to work. They (may) work for a while then failW with the error "Error: invalid input" with the "info" button showing the lines with "nextprime" and "append" showing. Sometimes the programs work for a while.

I think I must have something global being changed, but I cannot find it.

EXPORT Erro1(NN)
BEGIN
LOCAL CC,II,LL;
cc:=2;LL:={2};
FOR II FROM 2 TO NN DO
CC:=nextprime(CC);
LL:=append(LL,CC);
END;
PRINT (LL);
END;

I have tried changing variable names to single letter (global) or making temporaries. When I insert PRINT statements before the offending lines, these just print the number 2.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Bug? or my error? - ttw - 03-13-2016 04:07 AM
RE: Bug? or my error? - Thomas_Sch - 03-13-2016, 09:39 AM
RE: Bug? or my error? - Didier Lachieze - 03-13-2016, 09:51 AM
RE: Bug? or my error? - ttw - 03-13-2016, 11:16 AM
RE: Bug? or my error? - Thomas_Sch - 03-13-2016, 11:45 AM
RE: Bug? or my error? - DrD - 03-13-2016, 11:56 AM
RE: Bug? or my error? - Arno K - 03-13-2016, 11:57 AM
RE: Bug? or my error? - ttw - 03-13-2016, 03:15 PM



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