Post Reply 
KILL command.
01-23-2017, 07:13 PM
Post: #10
RE: KILL command.
Thank DrD !

Double thank for the "Vive la France". I give my program for you see. I will studie
your code for me programing. It is of course a good idea and loops you sugest and what I dont' have my way to did.


Code:

EXPORT TSTDate(J,M,A)
BEGIN
LOCAL ND, TST, BISS:=0;
CASE
  IF J*M*A==0 THEN MSGBOX("Date= "+J+"/"+M+"/"+A+"?");KILL;END;
  IF J<1 OR J>31 OR FP(J)≠0 THEN MSGBOX("Date= "+J+"/"+M+"/"+A+"?");KILL;END;
  IF M<1 OR M>12 OR FP(M)≠0 THEN MSGBOX("Date= "+J+"/"+M+"/"+A+"?");KILL;END;
  IF A<−4712 OR A>9999 OR FP(A) ≠ 0 OR A=0 THEN MSGBOX("Date= "+J+"/"+M+"/"+A+"?");KILL;END;
  IF M==04 OR M==06 OR M==09 OR M==11 AND J>30 THEN MSGBOX("Date= "+J+"/"+M+"/"+A+"?");KILL;END; 
END;

IF A==1582 THEN
TST:=A+M/100+J/10000 ELSE END;

IF (A==1582 AND (TST>1582.1004
AND TST<1582.1015)) 
THEN MSGBOX("Date= "+J+"/"+M+"/"+A+"?");KILL;END;

IF A MOD 4==0 AND(A MOD 400==0
   OR A MOD 100≠0)
   THEN BISS:=1
END;

IF A MOD 4==0 AND A<1582 
   THEN BISS:=1 END; 

IF M==2 AND BISS==1 
  AND J>29 THEN MSGBOX("Date= "+J+"/"+M+"/"+A+"?");KILL;END;

IF M==2 AND BISS==0
   AND J>28 THEN MSGBOX("Date= "+J+"/"+M+"/"+A+"?");KILL;END;

MSGBOX("Date OK");
            
END;

Gérard.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
KILL command. - ggauny@live.fr - 01-14-2017, 12:18 PM
RE: KILL command. - ggauny@live.fr - 01-23-2017, 10:56 AM
RE: KILL command. - DrD - 01-23-2017, 01:44 PM
RE: KILL command. - ggauny@live.fr - 01-23-2017, 02:11 PM
RE: KILL command. - DrD - 01-23-2017, 03:21 PM
RE: KILL command. - Han - 01-23-2017, 03:32 PM
RE: KILL command. - Tim Wessman - 01-23-2017, 03:44 PM
RE: KILL command. - ggauny@live.fr - 01-23-2017, 03:59 PM
RE: KILL command. - DrD - 01-23-2017, 04:58 PM
RE: KILL command. - ggauny@live.fr - 01-23-2017 07:13 PM
RE: KILL command. - DrD - 01-23-2017, 07:26 PM



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