1. the 'date()' function

hello... can anyone help please???

i've tried using the 'date()' function in a euphoria program as shown in the
'library' text.

e.g. now = date()

(where 'now' has already been declared as a sequence)

however this generates the error "'date' has not been declared"

the 'library' description of 'date()' does not state that one of the 'include'
files must be 'included' e.g. 'misc.e' or 'get.e'

so i am not sure what i've missed...

thank you for any ideas or advice you may be able to offer...

cheerz... eel...

new topic     » topic index » view message » categorize

2. Re: the 'date()' function

eel picton wrote:
> 
> hello... can anyone help please???
> 
> i've tried using the 'date()' function in a euphoria program as shown in the
> 'library'
> text.
> 
> e.g. now = date()
> 
> (where 'now' has already been declared as a sequence)

That appears to be correct.

> however this generates the error "'date' has not been declared"

Look to see if there is an ex.err file, and if so, post it, that 
might help.

> the 'library' description of 'date()' does not state that one of the 'include'
> files
> must be 'included' e.g. 'misc.e' or 'get.e'

The date() function in built in, you shouldn't need any includes to 
have it work.

Irv

new topic     » goto parent     » topic index » view message » categorize

3. Re: the 'date()' function

eel picton wrote:

> hello... can anyone help please???
> 
> i've tried using the 'date()' function in a euphoria program as shown
> in the 'library' text.
> 
> e.g. now = date()
> 
> (where 'now' has already been declared as a sequence)
> 
> however this generates the error "'date' has not been declared"
> 
> the 'library' description of 'date()' does not state that one of the
> 'include' files must be 'included' e.g. 'misc.e' or 'get.e'
> 
> so i am not sure what i've missed...
> 
> thank you for any ideas or advice you may be able to offer...

In cases like this, it's always a good idea to post the *actual code*
that you use here, rather then trying to describe the code in prose.

I just tested the following:
sequence now
now = date()


It runs fine of course, using the DOS and the Windows Euphoria 2.4
interpreter. Maybe you wrote 'now = date' instead of 'now = date()'? smile

Regards,
   Juergen

new topic     » goto parent     » topic index » view message » categorize

4. Re: the 'date()' function

On 25 Jun 2004, at 14:14, Juergen Luethje wrote:

> 
> 
> posted by: Juergen Luethje <j.lue at gmx.de>
> 
> eel picton wrote:
> 
> > hello... can anyone help please???
> > 
> > i've tried using the 'date()' function in a euphoria program as shown
> > in the 'library' text.
> > 
> > e.g. now = date()
> > 
> > (where 'now' has already been declared as a sequence)
> > 
> > however this generates the error "'date' has not been declared"
> > 
> > the 'library' description of 'date()' does not state that one of the
> > 'include' files must be 'included' e.g. 'misc.e' or 'get.e'
> > 
> > so i am not sure what i've missed...
> > 
> > thank you for any ideas or advice you may be able to offer...
> 
> In cases like this, it's always a good idea to post the *actual code*
> that you use here, rather then trying to describe the code in prose.
> 
> I just tested the following:
> }}}
<eucode>
> sequence now
> now = date()
> </eucode>
{{{

> 
> It runs fine of course, using the DOS and the Windows Euphoria 2.4
> interpreter. Maybe you wrote 'now = date' instead of 'now = date()'? smile

Or maybe wrote Date() in the actual code, which is a different animal entirely!

This works too (watch it wordwrap and be unuseable)

object junk
junk = date() -- for 4,5,6
if (junk[4] > 12) then junk[4] -= 12 end if
junk = sprintf("%d",junk[4]) &":"& sprintf("%d",junk[5]) &":"& 
sprintf("%d",junk[6])
titlebar(junk&" this has been a date test... go on now!")


Kat

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu