[Coco] Julian Date

Christopher R. Hawks chawks at dls.net
Wed May 24 18:03:17 EDT 2017


On Wed, 24 May 2017 14:28:04 -0700
Wayne Campbell <asa.rand at gmail.com> wrote:

> The functions provided by Luis are not Basic09. B09 does not support
> function structures like this, and MOD in B09 is a ML function whose
> syntax is MOD(arg1,arg2), not arg1 MOD arg2.
> 
> 

  And while you _can_ set the values of parameters passed in
(dd = dias, mm = FIX(dd / 61) * 2 + 1, etc) NOT recommended 
I'm pretty sure you can't set the function name to something
(FechaJulDMA = dias)

> On May 24, 2017 2:22 PM, "Gregory Law" <glaw at live.com> wrote:
> 
> This is Basic09 on OS-9/NitrOS-9.
> 
> On 5/24/2017 5:18:54 PM, "Wayne Campbell" <asa.rand at gmail.com> wrote:
> 
> >I find these two functions interesting. What language is it?
> >
> >It looks like BASIC, but I've never seen a function in basic written
> >this
> >way before.
> >
> >
> >On May 23, 2017 7:37 PM, "Luis Fernández" <luis46coco at hotmail.com>
> >wrote:
> >
> >>  OR
> >>
> >>
> >>  FUNCTION FechaJulDMA (tjul, dd, mm, aa)
> >>  T = tjul + 62
> >>  t2 = FIX(T / 1461) * 4 + 1700
> >>  t1 = T MOD 1461
> >>  IF t1 > 365 THEN
> >>  t1 = t1 - 1
> >>  oa = FIX(t1 / 365)
> >>  t1 = t1 MOD 365
> >>  END IF
> >>  aa = t2 + oa
> >>  dias = t1 + 1
> >>  dd = dias
> >>  swb = 1 - SGN(oa)
> >>  IF dd > 212 + swb THEN dd = dd + 30
> >>  IF dd > 59 + swb THEN dd = dd + 2 - swb
> >>  mm = FIX(dd / 61) * 2 + 1
> >>  dd = dd MOD 61
> >>  IF dd > 31 THEN mm = mm + 1: dd = dd - 31
> >>  IF mm > 7 THEN mm = mm - 1
> >>  FechaJulDMA = dias
> >>  END FUNCTION
> >>
> 
> 
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
> 




Christopher R. Hawks
HAWKSoft
-- 
I dipped into the future far as human eye could see,
Saw the vision of the world and all the wonder that would be.
		--Alfred Lord Tennyson
----------------------------------------
       \   ^__^                         
        \  (oo)\_______                 
           (__)\       )\/\           
               ||----w |                
               ||     ||                


More information about the Coco mailing list