Post Reply 
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
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;
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


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 - Eddie W. Shore - 03-11-2014, 01:55 PM



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