PL/SQL Coding Assistance...

From: <mmartin-ez_at_hiv.hjf.org>
Date: Fri, 07 Aug 1998 13:33:41 GMT
Message-ID: <6qevnm$rdg$1_at_nnrp1.dejanews.com>



Could I get someone to look over some code I am trying to use in a calendar module. The person in our office who is the PL/SQL guru is on vacation and I am stuck. I cannot get a full compilation. Suggestions?

-Marc.

mmartin-ez_at_hiv.hjf.org

Code as Follows: (sorry if it is sloppy...it wouldn't keep its form

PROCEDURE day_numbering IS

tmp_month                  number;
today_date	               date;
first_day_of_month	       number;
column				       number := 1;
calendar_date			   number := 1;
r_row					   number;
days_in_month              number;


begin


  • --------- --Finding the first day of month and then looping day + 1 while setting button property-- --to the day of month up to/through column 7. End loop and continue to next loop(s). --
  • --------- while column <= 7 loop if column < first_day_of_month then set_item_property('(:present_month_blk.r1||c||to_char(column)|| .but)',label, ''); column := column +1; else set_item_property('(:present_month_blk.r1||c||to_char(column)|| .but)',label, calendar_date); column := column + 1; calendar_date := calendar_date + 1; end if; end loop;
  • ---------------- --Three loops here. First, there is a "while" loop that will continue to repeat until the last-- --day of the month is reached. The second "for" loop is for rows 2-6 and ends when that is -- --reached. The third "for" loop is for each column 1-7. --
  • ---------------- while calendar_date <= days_in_month loop for r_row IN 2..6 loop for column IN 1..7 loop set_item_property('(:present_month_blk.r||(r_row)||c|| (column)||.but)',label, calendar_date); calendar_date := calendar_date + 1; column := column +1; end loop; r_row := r_row + 1; end loop; end loop; end;

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Fri Aug 07 1998 - 15:33:41 CEST

Original text of this message