[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The Apple II Mail Group
Ok, just as Bev has the right to do as she pleases with A2MG,
you have the (constitutional) right to express your opinions of
this. However, having this right does not require you to always
exercise it. My overall point, should Bev decide to remove
anyone (me included) from the group, we have no reason to
complain. It is after all, a free service which is certainly
less than the value it provides for me.
Should Bev decide I have earned her ire, I would at least have
the courtesy to discuss this with her in e-mail and not in a
public forum. IMHO, this public flaming is rather tasteless
and extremely demeaning to both the recipient and the flamers.
I would expect such as this from the MS/PC world. It is after
all, pretty common but I had hopes that the Apple II group had
more intelligence than these threads show.
As for your request. I can only offer the text code from my
reply. Taken out of context, it may prove to be pointless to
some. Actually, it may prove valueless to anybody. All it
does is branch to a subroutine which holds part of the original
code and a simple fix. It does show the flaw in using line
numbers without space between the for growth. This code was
written in the reply only and never actually tested by myself
other than reviewing the logic.
BASIC code follows. Cut here :-)
--------------------------------
# 874 test string length. If 6, assumes the string is
# numbers only. Year zero MUST be entered as 00
# Then build Z$ as ##/##/##
# 875 test for length again. If length 8 then we
# assume the string is ok and continue testing
# further along for numeric values.
# 876 string length failed, branch.
874 IF LEN (Z$) = 6 THEN Z$ = MID$ (Z$,1,2) + "/" + MID$
(Z$,3,2) + "/" + MID$ (Z$,5,2)
875 N = 0: IF LEN (Z$) = 8 THEN 877
876 GOTO 887
# 877 test month value
# 878 test day value
# 879 test year value 0..99.
# 880 logical branch based on month
# 881 Leap year
# 882 ditto
] 877 R9 = VAL ( MID$ (Z$,1,2)): IF R9 < 1 OR R9 > 12 THEN 887
] 878 B0 = VAL ( MID$ (Z$,4,2)): IF B0 < 1 OR B0 > 31 THEN 887
] 879 A0 = VAL ( MID$ (Z$,7,2)): IF A0 < 0 OR A0 > 99 THEN 887
880 ON R9 GOTO 884,881,884,883,884,883,884,884,883,884,883,884
] 881 IF (A0 / 4) < > INT (A0 / 4) THEN IF B0 > 28 THEN 887
882 IF B0 > 29 THEN 887
# 883 Size of month tests
# 884 Make month string
# 885 Make day string
883 IF B0 > 30 THEN 887
884 N9$ = STR$ (R9): IF R9 < 10 THEN N9$ = "0" + N9$
885 Y9$ = STR$ (B0): IF B0 < 10 THEN Y9$ = "0" + Y9$
# 886 was make simple year string and return.
# Now, gosub routine which sets year string.
# then return. This could also be a GOTO ##
# in which case the RETURN on 886 is not needed.
] 886 GOSUB 60000 : RETURN
# 887 Test for error. If Z$="MM/DD/YY" just exit.
# 888 Set err flag and exit.
887 IF Z$ = "MM/DD/YY" THEN RETURN
888 N = 1: RETURN
# 60000 Test if year < 10. Yes, pad with two
# spaces build string and exit
# 60010 Two digit year, pad with only one space
] 60000 IF A0 < 10 THEN Z$ = N9$ + "/" + Y9$ + "/" + MID$ (" " + STR$
(A0),2,2): RETURN
] 60010 Z$ = N9$ + "/" + Y9$ + "/" + MID$ (" " + STR$ (A0),2,2):
RETURN
--
Thank you for your time and interest. I hope it was helpful
or at least interesting.
Phoenyx,
Apple2 user since March 1984
Links to Phoenyx's pages:
preferred..... http://zip.to/Phoenyx_A2
alternate..... http://www.tinyangeldesigns.com/Apple2