Hey everyone, first time writing something this advanced, basically this is a program that will take a date that you enter (for example 9/10/2011), add 'N' amount of days, and output the result in a matter of DD/MM/YYYY. The issue that recently came about once I started to go over a few days to add, it started having issues calculating what L6(M) is…. (M is Months, in this case) I assumed that this issue was fairly straight forward, you cannot use M as a variable in Lists at ALL… But I tested it myself and used L6(M) outside of the program running, and it gave me the correct answer.
I'm wondering: What is an alternative way to using M as a variable for finding how many days are in Month M
(Don't worry about the B and C variables, I was using as Debugs for how many loops were going on)
ClrHome Prompt Y,M,D,N 12->dim(L6) 31->L6(1) 29->L6(2) 31->L6(3) 30->L6(4) 31->L6(5) 30->L6(6) 31->L6(7) 31->L6(8) 30->L6(9) 31->L6(10) 30->L6(11) 31->L6(12) DelVar B DelVar C Lbl A While L6(M)>D and (N>0) D+1->D N-1->N End If L6(M)=D Then 1->D M+1->M B+1->B Goto A Disp B,"B Loops Done" End If M=12 Then Y+1->Y 1->M 1->D C+1->C Disp C,"C Loops Done" Goto A End If N=(0) Then ClrHome Disp "Day:"D Disp "Month:"M Disp "Year:"Y End