× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> From: Bob Cozzi
> 
> As a follow up: This code was/is: (C) COPR. 1999 by Robert Cozzi, Jr.

This brings up an interesting point.  Bob, I'm not picking on you,
because I have a bunch of code in cyberspace as well.  But looking at
this particular code, what exactly in it do you consider copyrightable?

Certainly it's not the part that tests the date - that's pretty standard
stuff.  And setting up the difference between the date and 10/14/1582 is
simply part of the API.  Converting the value to 1S0 isn't much either.

I suppose the variable names and the comment are copyrightable.  Would
rewriting the comment header and changing the variable names actually
remove the copyrightable nature of this code?

I guess my question is, what exactly is the IP that is being protected
here?

Joe


>
*-----------------------------------------------------------------------
--
> * yDayOfWeek returns the day of the week (1=Sunday, . . 7=Saturday)
>
*-----------------------------------------------------------------------
--
>  yDayOfWeek      B                   Export
> * Procedure interface
>  yDayOfWeek      PI             1S 0
>   p$InDate                       D   Const DatFmt(*ISO)
> *
> * BaseDate is the day the calendar changed
>   BaseDate       S               D   Inz(D'1582-10-14') Static
>   nDayOfWeek     S             10I 0 Static
>   nDays          S             10I 0
>   r$Day          S              1S 0
> *---------------------------------------------------------------*
> /free
>   Test(E) p$InDate;
>   If %error;
>      Return -1;
>   EndIf;
>    nDays = %diff(p$InDate:BaseDate:*D);
> 
>    CallP CEEDYWK(nDays:nDayOfweek);
>    r$Day = nDayOfWeek;
>    Return r$Day;
> 
>  /end-free
> P yDayOfWeek      E


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.