Need Help with INPUT
03-01-2014, 07:54 PM (This post was last modified: 03-01-2014 09:17 PM by Eddie W. Shore.)
Post: #1
 Eddie W. Shore Senior Member Posts: 1,561 Joined: Dec 2013
Need Help with INPUT
I keep getting Error: Invalid Input and I don't get where the error is or what causes it. Does INPUT not work within loops? Any help is greatly appreciated.

Program:
Code:
 EXPORT EXPSMTH() BEGIN LOCAL X,A,M,D,S,P; LOCAL K,C,L1,L2; // L1: Actual Data, L2: Predictive Data // Initialize INPUT({X,A},"INITIALIZE",{"DATA:","ALPHA:"}); L1:={X}; L2:={X}; S:=S+1; REPEAT CHOOSE(C, "OPTIONS", "Add Point", "Delete Last Point", "Quit"); IF C==1 THEN INPUT(X, "NEXT POINT"); // This is where the error points to.  Can't INPUT work with globalize variables?  L1:=CONCAT(L1, {X}); S:=S+1; END; IF C==2 THEN L1:=SUB(L1,1,S); S:=S-1; END; RECT(); TEXTOUT_P(12,0,"# OF POINTS: "+STRING(S),2); IF S>1 THEN P:=L2(1); FOR K FROM 2 TO S DO P:=P+(L2(K)-L1(K))*A; END; TEXTOUT_P(60,0,"ALPHA: "+STRING(A),2); TEXTOUT_P(72,0,"PREDICTION: "+STRING(P),2); END; WAIT(-1); UNTIL C ==0 OR C==3; END;
 « Next Oldest | Next Newest »

 Messages In This Thread Need Help with INPUT - Eddie W. Shore - 03-01-2014 07:54 PM RE: Need Help with INPUT - Terje Vallestad - 03-01-2014, 08:33 PM RE: Need Help with INPUT - Eddie W. Shore - 03-01-2014, 09:16 PM RE: Need Help with INPUT - cyrille de brĂ©bisson - 03-03-2014, 07:03 AM RE: Need Help with INPUT - Eddie W. Shore - 03-11-2014, 01:55 PM

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