comp.lang.ada
 help / color / mirror / Atom feed
* Re: calenday (was Re: IBM Acquires Rational Ada
@ 2002-12-17  5:47 Grein, Christoph
  2002-12-17 14:43 ` Robert A Duff
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Grein, Christoph @ 2002-12-17  5:47 UTC (permalink / raw)


RM 13.4(8) For nonboolean enumeration types, if the coding is not specified for 
the type, then for each value of the type, the internal code shall be equal to 
its position number.

So your proposal is superfluous.

And there is no global agreement whether the week starts with Sunday or Monday. 
Historically, it starts with Sunday, but there are countries where it starts 
with Monday.

> >>> type day_name_type is (mon,tue,wed,thu,fri,sat,sun);
> >>> 
> >>> Add a representation clause to guarantee that the values
> >>> start with sun => 0, mon => 1 etc.  For some code, it is
> >>> much easier to work with the day of the week in the form
> >>> of a number.
> >> 
> >> I'm puzzled by this advice.
> >> 
> >> day_name_type'Pos(mon) .. day_name_type'Pos(sun)
> >> 
> >> is necessarily 0 .. 6, is it not?
> >> 
> > Yes, the _pos_ attribute is defined by the language as you state,
> > but Warren is looking to have the _representation_ specified in
> > the package specification.  This insures that instantiations of
> > Ada.Unchecked_Conversion between day_name_type and
> > integer types produce specified results.
> > 
> 
> Yes, but if what you want is "to work with the day of the week in
> the form of a number", why use Unchecked_Conversion when
> day_name_type'Pos does what you want without further ado?



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: calenday (was Re: IBM Acquires Rational Ada
  2002-12-17  5:47 calenday (was Re: IBM Acquires Rational Ada Grein, Christoph
@ 2002-12-17 14:43 ` Robert A Duff
  2002-12-17 21:35   ` Wes Groleau
  2002-12-18  9:10   ` Anders Wirzenius
  2002-12-17 20:48 ` Dennis Lee Bieber
  2002-12-18 14:23 ` Karel Miklav
  2 siblings, 2 replies; 13+ messages in thread
From: Robert A Duff @ 2002-12-17 14:43 UTC (permalink / raw)


"Grein, Christoph" <christoph.grein@eurocopter.com> writes:

> RM 13.4(8) For nonboolean enumeration types, if the coding is not
> specified for the type, then for each value of the type, the internal
> code shall be equal to its position number.
> 
> So your proposal is superfluous.

And illegal, as our resident C++ guru pointed out.  ;-)

> And there is no global agreement whether the week starts with Sunday
> or Monday.  Historically, it starts with Sunday, but there are
> countries where it starts with Monday.

I read somewhere that there is an ISO standard for dates and times that
says the week starts on Monday.

However, I think I can quote a book that predates ISO by thousands of
years, which says Sunday is the first day of the week.  ;-)

I go with Sunday first.

- Bob



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: calenday (was Re: IBM Acquires Rational Ada
  2002-12-17  5:47 calenday (was Re: IBM Acquires Rational Ada Grein, Christoph
  2002-12-17 14:43 ` Robert A Duff
@ 2002-12-17 20:48 ` Dennis Lee Bieber
  2002-12-18 14:52   ` Ted Dennison
  2002-12-18 14:23 ` Karel Miklav
  2 siblings, 1 reply; 13+ messages in thread
From: Dennis Lee Bieber @ 2002-12-17 20:48 UTC (permalink / raw)


Grein, Christoph fed this fish to the penguins on Monday 16 December 
2002 09:47 pm:


> And there is no global agreement whether the week starts with Sunday
> or Monday. Historically, it starts with Sunday, but there are
> countries where it starts with Monday.
>
        For purposes of payroll processing, my former employer started the 
week on Saturday.

-- 
 > ============================================================== <
 >   wlfraed@ix.netcom.com  | Wulfraed  Dennis Lee Bieber  KD6MOG <
 >      wulfraed@dm.net     |       Bestiaria Support Staff       <
 > ============================================================== <
 >        Bestiaria Home Page: http://www.beastie.dm.net/         <
 >            Home Page: http://www.dm.net/~wulfraed/             <




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: calenday (was Re: IBM Acquires Rational Ada
  2002-12-17 14:43 ` Robert A Duff
@ 2002-12-17 21:35   ` Wes Groleau
  2002-12-18  2:09     ` Robert A Duff
  2002-12-18  9:10   ` Anders Wirzenius
  1 sibling, 1 reply; 13+ messages in thread
From: Wes Groleau @ 2002-12-17 21:35 UTC (permalink / raw)



> However, I think I can quote a book that predates ISO by thousands of
> years, which says Sunday is the first day of the week.  ;-)

If you are speaking of the book I think you are
speaking of, I am not aware of any passage that
actually names the first day or seventh day.  :-)




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: calenday (was Re: IBM Acquires Rational Ada
  2002-12-17 21:35   ` Wes Groleau
@ 2002-12-18  2:09     ` Robert A Duff
  2002-12-18  6:32       ` Dennis Lee Bieber
  2002-12-18 18:33       ` Wes Groleau
  0 siblings, 2 replies; 13+ messages in thread
From: Robert A Duff @ 2002-12-18  2:09 UTC (permalink / raw)


Wes Groleau <wesgroleau@despammed.com> writes:

> If you are speaking of the book I think you are
> speaking of, I am not aware of any passage that
> actually names the first day or seventh day.  :-)

I believe it calls the seventh day "sabbath".
I don't know if that's a name or a description or both.
But it's certainly the same day we call "saturday"
in the United States.  If you think it's referring to
what we call "sunday", I think you must have lost count
somewhere in the last few thousand years.  ;-)

- Bob



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: calenday (was Re: IBM Acquires Rational Ada
  2002-12-18  2:09     ` Robert A Duff
@ 2002-12-18  6:32       ` Dennis Lee Bieber
  2002-12-18 18:33       ` Wes Groleau
  1 sibling, 0 replies; 13+ messages in thread
From: Dennis Lee Bieber @ 2002-12-18  6:32 UTC (permalink / raw)


Robert A Duff fed this fish to the penguins on Tuesday 17 December 2002 
06:09 pm:

> I believe it calls the seventh day "sabbath".
> I don't know if that's a name or a description or both.
> But it's certainly the same day we call "saturday"
> in the United States.  If you think it's referring to
> what we call "sunday", I think you must have lost count
> somewhere in the last few thousand years.  ;-)
>
        Shall we add the minor confusion that, in many cultures, the "day" 
began at /sunset/ (hence such things as "Christmas eve", 
"Halloween"[aka All Hallows Eve] -- even though the calendar is labeled 
Dec 24, once the sun set, the /next/ day was considered to have 
started: Christmas).

-- 
 > ============================================================== <
 >   wlfraed@ix.netcom.com  | Wulfraed  Dennis Lee Bieber  KD6MOG <
 >      wulfraed@dm.net     |       Bestiaria Support Staff       <
 > ============================================================== <
 >        Bestiaria Home Page: http://www.beastie.dm.net/         <
 >            Home Page: http://www.dm.net/~wulfraed/             <




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: calenday (was Re: IBM Acquires Rational Ada
  2002-12-17 14:43 ` Robert A Duff
  2002-12-17 21:35   ` Wes Groleau
@ 2002-12-18  9:10   ` Anders Wirzenius
  1 sibling, 0 replies; 13+ messages in thread
From: Anders Wirzenius @ 2002-12-18  9:10 UTC (permalink / raw)



"Robert A Duff" <bobduff@shell01.TheWorld.com> wrote in message news:wcchedcpuy9.fsf@shell01.TheWorld.com...
> I read somewhere that there is an ISO standard for dates and times that
> says the week starts on Monday.
>
> However, I think I can quote a book that predates ISO by thousands of
> years, which says Sunday is the first day of the week.  ;-)
>
> I go with Sunday first.
>
> - Bob

ISO 8601

br
Anders





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: calenday (was Re: IBM Acquires Rational Ada
  2002-12-17  5:47 calenday (was Re: IBM Acquires Rational Ada Grein, Christoph
  2002-12-17 14:43 ` Robert A Duff
  2002-12-17 20:48 ` Dennis Lee Bieber
@ 2002-12-18 14:23 ` Karel Miklav
  2003-01-05 17:05   ` Locale package (Was: calenday) Jacob Sparre Andersen
  2 siblings, 1 reply; 13+ messages in thread
From: Karel Miklav @ 2002-12-18 14:23 UTC (permalink / raw)


Is there a package or something to work with locales in Ada (like in C, 
you know :) )?


Grein, Christoph wrote:
> RM 13.4(8) For nonboolean enumeration types, if the coding is not specified for 
> the type, then for each value of the type, the internal code shall be equal to 
> its position number.
> 
> So your proposal is superfluous.
> 
> And there is no global agreement whether the week starts with Sunday or Monday. 
> Historically, it starts with Sunday, but there are countries where it starts 
> with Monday.
> 
> 
>>>>>type day_name_type is (mon,tue,wed,thu,fri,sat,sun);
>>>>>
>>>>>Add a representation clause to guarantee that the values
>>>>>start with sun => 0, mon => 1 etc.  For some code, it is
>>>>>much easier to work with the day of the week in the form
>>>>>of a number.
>>>>
>>>>I'm puzzled by this advice.
>>>>
>>>>day_name_type'Pos(mon) .. day_name_type'Pos(sun)
>>>>
>>>>is necessarily 0 .. 6, is it not?
>>>>
>>>
>>>Yes, the _pos_ attribute is defined by the language as you state,
>>>but Warren is looking to have the _representation_ specified in
>>>the package specification.  This insures that instantiations of
>>>Ada.Unchecked_Conversion between day_name_type and
>>>integer types produce specified results.
>>>
>>
>>Yes, but if what you want is "to work with the day of the week in
>>the form of a number", why use Unchecked_Conversion when
>>day_name_type'Pos does what you want without further ado?




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: calenday (was Re: IBM Acquires Rational Ada
  2002-12-17 20:48 ` Dennis Lee Bieber
@ 2002-12-18 14:52   ` Ted Dennison
  2002-12-18 20:19     ` Dennis Lee Bieber
  0 siblings, 1 reply; 13+ messages in thread
From: Ted Dennison @ 2002-12-18 14:52 UTC (permalink / raw)


Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote in message news:<gj2ota.bk3.ln@beastie.ix.netcom.com>...
>         For purposes of payroll processing, my former employer started the 
> week on Saturday.

If we lend credence to anything ever done by any company's payroll
department, we're going to be awfully confused indeed (and rather
hungry too, I'd wadger).



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: calenday (was Re: IBM Acquires Rational Ada
  2002-12-18  2:09     ` Robert A Duff
  2002-12-18  6:32       ` Dennis Lee Bieber
@ 2002-12-18 18:33       ` Wes Groleau
  2002-12-18 21:04         ` Larry Kilgallen
  1 sibling, 1 reply; 13+ messages in thread
From: Wes Groleau @ 2002-12-18 18:33 UTC (permalink / raw)


Robert A Duff wrote:
> I believe it calls the seventh day "sabbath".

That it does.  But to insist that our Saturday
is exactly a multiple of seven days from that
Sabbath is to insist that the Jews never lost count
through all their dispersions and returnings.
Or anyone else before or since.

Which I suppose is possible.

Personally, I believe Noah lost count after
about eighty days on the ark.  :-)




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: calenday (was Re: IBM Acquires Rational Ada
  2002-12-18 14:52   ` Ted Dennison
@ 2002-12-18 20:19     ` Dennis Lee Bieber
  0 siblings, 0 replies; 13+ messages in thread
From: Dennis Lee Bieber @ 2002-12-18 20:19 UTC (permalink / raw)


Ted Dennison fed this fish to the penguins on Wednesday 18 December 
2002 06:52 am:

> 
> If we lend credence to anything ever done by any company's payroll
> department, we're going to be awfully confused indeed (and rather
> hungry too, I'd wadger).

        True -- when they implemented a scheme to make every other Friday part 
of a 3-day weekend, the start of the week became "noon" on Friday.

day     M  Tu  W  Th  Fam | Fpm  M  Tu  W  Th  F
hours   9   9  9   9   4  |  4                      44
                          |      9   9  9   9  -    36
                       40 |                    40
-- 
 > ============================================================== <
 >   wlfraed@ix.netcom.com  | Wulfraed  Dennis Lee Bieber  KD6MOG <
 >      wulfraed@dm.net     |       Bestiaria Support Staff       <
 > ============================================================== <
 >        Bestiaria Home Page: http://www.beastie.dm.net/         <
 >            Home Page: http://www.dm.net/~wulfraed/             <




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: calenday (was Re: IBM Acquires Rational Ada
  2002-12-18 18:33       ` Wes Groleau
@ 2002-12-18 21:04         ` Larry Kilgallen
  0 siblings, 0 replies; 13+ messages in thread
From: Larry Kilgallen @ 2002-12-18 21:04 UTC (permalink / raw)


In article <3E00BF83.3060301@most.ftw.rsc.raytheon.com>, Wes Groleau <wwgrol@most.ftw.rsc.raytheon.com> writes:
> Robert A Duff wrote:
>> I believe it calls the seventh day "sabbath".
> 
> That it does.  But to insist that our Saturday
> is exactly a multiple of seven days from that
> Sabbath is to insist that the Jews never lost count
> through all their dispersions and returnings.

Dispersions are good, because you get to compare two independent
time sources.  There are no Talmudic calendar disputes recorded,
are there ?

So I suppose we can conclude that no group of Jews in the Diaspora
spent any significant portion of time moving at anything close to
the speed of light :-)



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Locale package (Was: calenday)
  2002-12-18 14:23 ` Karel Miklav
@ 2003-01-05 17:05   ` Jacob Sparre Andersen
  0 siblings, 0 replies; 13+ messages in thread
From: Jacob Sparre Andersen @ 2003-01-05 17:05 UTC (permalink / raw)


Karel Miklav wrote:

> Is there a package or something to work with locales in Ada (like in C, 
> you know :) )?

Not in the standard libraries.

GtkAda comes with a package that is equivalent to (or a 
binding to) GNU Gettext.

Greetings,

Jacob
-- 
"Preserve wildlife, pickle a duck."




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2003-01-05 17:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-17  5:47 calenday (was Re: IBM Acquires Rational Ada Grein, Christoph
2002-12-17 14:43 ` Robert A Duff
2002-12-17 21:35   ` Wes Groleau
2002-12-18  2:09     ` Robert A Duff
2002-12-18  6:32       ` Dennis Lee Bieber
2002-12-18 18:33       ` Wes Groleau
2002-12-18 21:04         ` Larry Kilgallen
2002-12-18  9:10   ` Anders Wirzenius
2002-12-17 20:48 ` Dennis Lee Bieber
2002-12-18 14:52   ` Ted Dennison
2002-12-18 20:19     ` Dennis Lee Bieber
2002-12-18 14:23 ` Karel Miklav
2003-01-05 17:05   ` Locale package (Was: calenday) Jacob Sparre Andersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox