Post Reply 
REPEAT INPUT UNTIL...
03-20-2015, 11:30 AM
Post: #1
REPEAT INPUT UNTIL...
In my program I've this code:

Code:

control:=1;
REPEAT
INPUT({a, n, s, si}, "Chi-square Variance test", {"Signif. level α=", "Sample size n=", "Sample var s²=", "Popul. var σ₀²="}, 
{"Significance level α (default 0.05)", "Sample size", "Observed Sample Variance  s²", "Population Variation σ₀²"},{0.01, 2, 1, 1}, {0.05,2,  1, 1});
CASE
IF (a <=0 OR a>= 1) THEN MSGBOX("Significance level must be > 0 AND <1"); control:=1; END;
IF (n<2) THEN MSGBOX("Sample numerosity must be >=2"); control:=1; END;
IF (s<0) THEN MSGBOX("Sample Variance must be >= 0"); control:=1; END;
IF (si<=0) THEN MSGBOX("Population Variance must be > 0"); control:=1; END;
DEFAULT control:= 0;
END; // case
UNTIL control < 1;

It works but non as I would like...
If there is an error, MSGBOX is showed after the whole input routine, then restart the input and this reset all variables...

There is a way to present every msgbox contextually to the error catching and then not to reset the variables without errors?

Thank you in advance

Salvo

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
REPEAT INPUT UNTIL... - salvomic - 03-20-2015 11:30 AM
RE: REPEAT INPUT UNTIL... - salvomic - 03-20-2015, 12:18 PM



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