'I've cropped this down as much as possible to illustrate 'my problem. Why
does this compile fine with x = (DtaSize) 'in the code or references to
(DtaTime) or (DtaDate) 'But when they are commented out It won't compile
because 'SplitDate is an undefined sub 'I've also gotten parameter mismatch
error on SplitDate 'I wish that when you got that error the IDE would show
'what it expected 'My main problem is I made the calender part for one
program 'and it worked fine but when I went to transfer the calender
'subroutine to another program all of a sudden I can't compile 'it. Someone
educate me on what I'm doing wrong or not 'understanding. Thanks
$INCLUDE "c:\lib\PB32.INC" ' link PB32 library 'x = (DtaSize) 'print
(DtaTime); 'print (DtaDate);
defint A-Z
esc$ = CHR$(27)
up$ = CHR$(0) + chr$(72) : down$ = CHR$(0) + chr$(80) goleft$ =
CHR$(0) + chr$(75) : goright$ = CHR$(0) + chr$(77) pagedown$ = CHR$(0)
+ chr$(81) : pageup$ = CHR$(0) + chr$(73) goend$ = CHR$(0) + chr$(79)
: gohome$ = CHR$(0) + chr$(71)
usedate$ = date$
SplitDate usedate$, orgMonth,orgDay,orgYear 'gets seperate values for date
monthswitchpoint: color 15,1 cls print" [ F1 = Help ]
[ ESC = EXI
print"
+----------+---------+---------+---------+---------+---------+--------
print" | | | | | | |
print" | | | | | | |
print"
+----------+---------+---------+---------+---------+---------+--------
print" | | | | | | |
print" | | | | | | |
print"
+----------+---------+---------+---------+---------+---------+--------
print" | | | | | | |
print" | | | | | | |
print"
+----------+---------+---------+---------+---------+---------+--------
print" | | | | | | |
print" | | | | | | |
print"
+----------+---------+---------+---------+---------+---------+--------
print" | | | | | | |
print" | | | | | | |
print"
+----------+---------+---------+---------+---------+---------+--------
print" | | | | | | |
print" | | | | | | |
print"
+----------+---------+---------+---------+---------+---------+--------
print" | | | [ TIME ] USE THE KEYS BELOW TO CHANGE
print" | | | CALENDERS print"
+----------+---------+------------------------------------------------
print" | [LEFT `] [DOWN ] [PAGE DOWN] [HOME] [PAGE UP] [ UP ^] [RIGHT
print"
+---------------------------------------------------------------------
SplitDate usedate$, Month,Day,Year 'gets seperate values for date locate
2,34 print " "; print MonthName(Month); Year ' name of month for number of
month
daystop = DaysInMonth(Month)
if Leap(Year) and Month = 2 then incr daystop
redim daze (1 to 7)
daze(1) = 8
daze(2) = 18
daze(3) = 28
daze(4) = 38
daze(5) = 48
daze(6) = 58
daze(7) = 68
redim daze$ (1 to 7)
daze$(1) = "SUN"
daze$(2) = "MON"
daze$(3) = "TUE"
daze$(4) = "WED"
daze$(5) = "THUR"
daze$(6) = "FRI"
daze$(7) = "SAT"
for i = 1 to 7
locate 3,daze(i)
print daze$(i)
next i
vert = 7
first$ = MakeDate(Month, 1, Year)
begin = dow(first$)
for daycount = 1 to daystop
if daycount = day and month = orgmonth and year = orgyear then color 1,15
else color 15,1 end if
locate vert,daze(begin)
print daycount
incr begin
if begin = 8 then
begin = 1
incr vert, 3
end if
next daycount
do
ch$ = inkey$
locate 22,26
if ch$ = esc$ then exit do
if ch$ = goright$ then
incr month
if month > 12 then
month = 1
incr year
if year > 2078 then year = 2078 :Month = 12
end if
usedate$ = MakeDate(Month,Day, Year)
goto monthswitchpoint
end if
if ch$ = goleft$ then
decr month
if month < 1 then
month = 12
decr year
if year < 1900 then year = 1900 : Month = 1
end if
usedate$ = MakeDate(Month,Day, Year)
goto monthswitchpoint
end if
if ch$ = up$ then
incr year
if year > 2078 then year = 2078
usedate$ = MakeDate(Month,Day, Year)
goto monthswitchpoint
end if
if ch$ = down$ then
decr year
if year < 1900 then year = 1900
>>> Continued to next message
---
* SLMR 2.1a *
--- InterEcho 1.19
---------------
* Origin: The DataStream (Node 1), Peoria, IL (1:232/30)
|