function returning days of the week
- From: ssylee <stanigator@xxxxxxxxx>
- Date: Mon, 31 Dec 2007 01:10:59 -0800 (PST)
I need to write a function that would read in a byte that would return
a number between 1 to 7, 1 being Sunday, 2 being Monday, etc. I want
to return an actual string that says "Sunday", or "Monday", etc.
corresponding to the number. I know that the best method to implement
a lookup conversion table would be using switch(variable ) ... case
x: .... structure. However, I may need to pass an array as one of the
parameters in order to access the text itself. Is there anything
inefficient in passing a character array as a parameter based on
memory consumption on an embedded microprocessor system? Thanks.
.
- Follow-Ups:
- Re: function returning days of the week
- From: user923005
- Re: function returning days of the week
- From: Martin Ambuhl
- Re: function returning days of the week
- From: Richard Bos
- Re: function returning days of the week
- Prev by Date: Re: function reading hour register either in 12 or 24 hour formats and returning properly
- Next by Date: Re: Programming in standard c
- Previous by thread: function reading hour register either in 12 or 24 hour formats and returning properly
- Next by thread: Re: function returning days of the week
- Index(es):