Home > Archive > Clarion > March 2004 > Re: Programmer Needed
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: Programmer Needed
|
|
| novamax 2004-03-26, 11:01 pm |
| We are group of Clarion Programmers. We deal with business applications. We are keenly interested in expanding the business with you. Kindly let us know your opinion on the same. We are residents of INDIA. For your perusal I am sending you the codelet dev
eloped by us.
Waiting for your reply urgently.
Thanks.
Here is a small function for LeapYear Checking (IsLeapYear)
It accepts 4 Digit Long Year as a parameter and returns the byte. If it returns 0, it is not a leap year. If it returns 1, it is a leap year.
!--------------------------------------------------------
!Create Date i.e. 29th Feb. based on the year recd. as parm.
Date# = DATE(2,29,pYEAR)
!Format the Date
IMP:DTSTR" = FORMAT(Date#,@D08-B)
!Check for the Leapyear.
IF SUB(CLIP(IMP:DTSTR"),4,3) = 'FEB'
RETURN(1) !Its a leapyear.
ELSIF SUB(CLIP(IMP:DTSTR"),4,3) = 'MAR'
RETURN(0) !It isn't a leap year.
END
!-------------------------------------------------
| |
| novamax 2004-03-26, 11:01 pm |
| We are group of Clarion Programmers. We deal with business applications. We are keenly interested in expanding the business with you. Kindly let us know your opinion on the same. We are residents of INDIA. For your perusal I am sending you the codelet dev
eloped by us.
Waiting for your reply urgently.
Thanks.
Here is a small function for LeapYear Checking (IsLeapYear)
It accepts 4 Digit Long Year as a parameter and returns the byte. If it returns 0, it is not a leap year. If it returns 1, it is a leap year.
!--------------------------------------------------------
!Create Date i.e. 29th Feb. based on the year recd. as parm.
Date# = DATE(2,29,pYEAR)
!Format the Date
IMP:DTSTR" = FORMAT(Date#,@D08-B)
!Check for the Leapyear.
IF SUB(CLIP(IMP:DTSTR"),4,3) = 'FEB'
RETURN(1) !Its a leapyear.
ELSIF SUB(CLIP(IMP:DTSTR"),4,3) = 'MAR'
RETURN(0) !It isn't a leap year.
END
!-------------------------------------------------
| |
| Neal Phillips 2004-03-26, 11:01 pm |
| That is a long way of doing it !
Month#=Month(Date(2,29,pYear)
Returns either Month# = 2 (is a leap year) or Month# = 3 (is not a leap
year)
Cheers
Neal
>
> It accepts 4 Digit Long Year as a parameter and returns the byte. If it
returns 0, it is not a leap year. If it returns 1, it is a leap year.
> !--------------------------------------------------------
> !Create Date i.e. 29th Feb. based on the year recd. as parm.
> Date# = DATE(2,29,pYEAR)
> !Format the Date
> IMP:DTSTR" = FORMAT(Date#,@D08-B)
> !Check for the Leapyear.
> IF SUB(CLIP(IMP:DTSTR"),4,3) = 'FEB'
> RETURN(1) !Its a leapyear.
> ELSIF SUB(CLIP(IMP:DTSTR"),4,3) = 'MAR'
> RETURN(0) !It isn't a leap year.
> END
> !-------------------------------------------------
>
>
| |
| Arnett, James 2004-03-26, 11:01 pm |
| I guess when you're outsourcing it, you can make up for these really
big expressions with really small paychecks ; )
"Neal Phillips" <NealRemove@RemoveAbleSoftware.co.nz> wrote in message news:<0MK0c.7152$SZ.143676@news.xtra.co.nz>...[color=darkred]
>
> That is a long way of doing it !
>
> Month#=Month(Date(2,29,pYear)
>
> Returns either Month# = 2 (is a leap year) or Month# = 3 (is not a leap
> year)
> Cheers
> Neal
>
>
> returns 0, it is not a leap year. If it returns 1, it is a leap year.
| |
| Simon Kempster 2004-03-26, 11:01 pm |
| > That is a long way of doing it !
> Month#=Month(Date(2,29,pYear)
> Returns either Month# = 2 (is a leap year) or Month# = 3 (is not a leap
> year)
Or do it like this:
LeapYear#=3-Month(Date(2,29,pYear)
That will then give 0 for a non-leap year and 1 for a leap year, as
they originally wanted.
Simon Kempster
|
|
|
|
|