home *** CD-ROM | disk | FTP | other *** search
INI File | 1997-06-12 | 3.8 KB | 144 lines |
- [OPTIONS]
- ; YearFiscal.cc1 written by Kent Briggs
- ; n00 = line color
- ; n01 = text color
- ; n02 = day
- ; n03 = month
- ; n04 = year
- ; n05 = x
- ; n06 = y
- ; n07 = loop 1 to 12 months
- ; n08 = x2
- ; n09 = y2
- ; n10 = current month
- ; n11 = julian day
- ; n12 = loop 1 to 7 days
- ; n13 = week starts
- ; n14 = week number
- ; n15 = weeks in month
- ; n16 = loop 1 to weeks
- ; n17 = shading color
- ; t00 = title
- ; t01 = footnote
- ; t02 = week string
- ; t03 = typeface
- ; t04 = subtitle
- ; t05 = month/dow name
- ; t06 = week test 1
- ; t07 = week test 2
- Orientation(Portrait)
- Option(t00,Text [t],"Title","Fiscal Year")
- Option(t04,Text [t],"Subtitle","Company Name")
- Option(t01,Text [t],"Footnote","Printed by Calendar Commander")
- Option(t02,Text [t],"Weeks in months 1-12","445445445445")
- Option(n00,Color [n],"Line color",0)
- Option(n17,Color [n],"Shading color",$C0FFFF)
- Option(n01,Color [n],"Text color",0)
- Option(t03,Typeface [t],"Typeface","Times New Roman")
- [COMMANDS]
- ; draw title, subtitle, footnote
- Font(t03,4,n01,0,0,0,0)
- Text(50,2,1,t00)
- Font(t03,3,n01,0,1,0,0)
- Text(50,7,1,t04)
- Font(t03,1.5,n01,0,0,0,0)
- Text(50,98,7,t01)
- ; get starting date
- DateNum(n02,Day)
- DateNum(n03,Month)
- DateNum(n04,Year)
- WeekDay(n13,n04,n03,n02)
- ; calc julian day
- DateToJulian(n11,n04,n03,n02)
- NumVar(n10,set equal to,n03)
- ; find first full month
- Block(If,n02,>,15)
- NumVar(n10,increment by,1)
- EndBlock
- ; initialize x,y values
- NumVar(n05,set equal to,5)
- NumVar(n06,set equal to,12)
- NumVar(n07,set equal to,1)
- NumVar(n14,set equal to,1)
- TextVar(t06,set equal to,"")
- TextVar(t07,set equal to,"")
- Pen(n00,2,0)
- ; loop for 12 months
- Block(While,n07,<=,12)
- NumVar(n08,set equal to,n05)
- NumVar(n08,increment by,28)
- NumVar(n09,set equal to,n06)
- NumVar(n09,increment by,3)
- Brush(n17,0)
- Rectangle(n05,n06,n08,n09,1)
- Brush($FFFFFF,1)
- NumVar(n06,increment by,3)
- NumVar(n09,increment by,15)
- NumVar(n08,decrement by,24.5)
- Brush(n17,0)
- Rectangle(n05,n06,n08,n09,0)
- Brush($FFFFFF,1)
- NumVar(n08,increment by,24.5)
- Grid(n05,n06,n08,n09,8,6,1)
- NumVar(n06,decrement by,3)
- ; draw month name
- DateText(t05,Month,Full,Capitalized,n10)
- NumVar(n08,decrement by,14)
- NumVar(n09,decrement by,16.5)
- Font(t03,2,n01,0,0,0,0)
- Text(n08,n09,4,t05)
- ; draw week days
- NumVar(n08,decrement by,12.25)
- NumVar(n09,increment by,2.75)
- Font(t03,1.5,n01,0,0,0,0)
- Text(n08,n09,4,"Wk")
- NumVar(n12,set equal to,1)
- Block(While,n12,<=,7)
- NumVar(n08,increment by,3.5)
- DateText(t05,Day of week,1-letter,Capitalized,n13)
- Text(n08,n09,4,t05)
- NumVar(n12,increment by,1)
- NumVar(n13,increment by,1)
- EndBlock
- NumVar(n13,decrement by,7)
- NumVar(n08,decrement by,24.5)
- NumVar(n09,increment by,2.5)
- ; get weeks in current month
- TextVar(t06,append with,"5")
- Block(If,t02,>=,t06)
- NumVar(n15,set equal to,5)
- TextVar(t07,append with,"5")
- EndBlock
- Block(If,t02,<,t06)
- NumVar(n15,set equal to,4)
- TextVar(t07,append with,"4")
- EndBlock
- TextVar(t06,set equal to,t07)
- NumVar(n16,set equal to,1)
- Block(While,n16,<=,n15)
- Text(n08,n09,4,n14)
- NumVar(n08,increment by,3.5)
- NumVar(n12,set equal to,1)
- Block(While,n12,<=,7)
- ; convert julian back to day
- JulianToDate(n02,Day,n11)
- Text(n08,n09,4,n02)
- NumVar(n12,increment by,1)
- NumVar(n11,increment by,1)
- NumVar(n08,increment by,3.5)
- EndBlock
- NumVar(n08,decrement by,28)
- NumVar(n09,increment by,2.5)
- NumVar(n14,increment by,1)
- NumVar(n16,increment by,1)
- EndBlock
- ; advance to next month
- NumVar(n07,increment by,1)
- NumVar(n10,increment by,1)
- NumVar(n05,increment by,31)
- Block(If,n05,>,90)
- NumVar(n05,set equal to,5)
- NumVar(n06,increment by,21.5)
- EndBlock
- EndBlock
-