05-21-2022, 10:18 PM
Nice! I love stuff like this. Here's what I used to d a lot of back in the 1990's, to save memory space...
I used what I termed as "Data Strings" to store info. Parse the string and display the results. Saving mem lead to a lot of obfuscated coding but at least it got the program working when space was an issue.
Pete
Code: (Select All)
dstring$ = "stndrdthththththth"
mstring$ = "January February March April May June July August SeptemberOctober November December "
DO
LINE INPUT "mo-day-year: ", xdate$
PRINT RTRIM$(MID$(mstring$, (VAL(MID$(xdate$, 1, 2)) - 1) * 9 + 1, 9)); " ";
PRINT LTRIM$(STR$((VAL(MID$(xdate$, 4)))));
IF MID$(xdate$, 4, 2) > "10" AND MID$(xdate$, 4, 2) < "21" OR VAL(MID$(xdate$, 5, 1)) = 0 THEN
PRINT "th, ";
ELSE
PRINT MID$(dstring$, VAL(MID$(xdate$, 5, 1)) * 2 - 1, 2); ", ";
END IF
PRINT MID$(xdate$, 7, 4)
PRINT
LOOP
I used what I termed as "Data Strings" to store info. Parse the string and display the results. Saving mem lead to a lot of obfuscated coding but at least it got the program working when space was an issue.
Pete