1. use of TRUE???

Hello,
I saw this example in Document 
"
function look_at(sequence path_name, sequence entry)
-- this function accepts two sequences as arguments
            printf(1, "%s\\%s: %d\n",
                           {path_name, entry[D_NAME], entry[D_SIZE]})
            return 0 -- keep going
end function
 
exit_code = walk_dir("C:\\euphoria\\Mycars", routine_id("look_at"),
TRUE)"
How does TRUE exist?
Do I create a constant TRUE or does it exist in another file?
Jvandal

new topic     » topic index » view message » categorize

2. Re: use of TRUE???

Whether TRUE is defined somewhere else or you need to define it in your
program probably depends on what includes you might have in your program; in
any case, if you just replace "TRUE" in the example with "1", that should
suffice in either case.

Dan Moyer

----- Original Message ----- 
From: "sixs" <sixs at ida.net>
To: <EUforum at topica.com>
Subject: use of TRUE???


>
>
> Hello,
> I saw this example in Document
> "
> function look_at(sequence path_name, sequence entry)
> -- this function accepts two sequences as arguments
>             printf(1, "%s\\%s: %d\n",
>                            {path_name, entry[D_NAME], entry[D_SIZE]})
>             return 0 -- keep going
> end function
>
> exit_code = walk_dir("C:\\euphoria\\Mycars", routine_id("look_at"),
> TRUE)"
> How does TRUE exist?
> Do I create a constant TRUE or does it exist in another file?
> Jvandal
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

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

3. Re: use of TRUE???

TRUE(=1) is defined in get.e and in database.e

Strictly speaking, since database.e includes get.e, the one in there
is unnecessary (Rob), though file.e, graphics.e, wildcard.e also refer
to it, in their comments, and, (like database.e) include misc.e, it
might be sensible to put one in misc.e as well (though get.e does not
include that). That's being picky though.

It will make no difference if you define another in your file as well

Pete
http://palacebuilders.pwp.blueyonder.co.uk/euphoria.html

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

4. Re: use of TRUE???

I just use integers 0 or 1, where 1 is true or 0 is false.
Any number greater than 0 is true.
----- Original Message ----- 
From: "sixs" <sixs at ida.net>
To: <EUforum at topica.com>
Subject: use of TRUE???


> 
> 
> Hello,
> I saw this example in Document 
> "
> function look_at(sequence path_name, sequence entry)
> -- this function accepts two sequences as arguments
>             printf(1, "%s\\%s: %d\n",
>                            {path_name, entry[D_NAME], entry[D_SIZE]})
>             return 0 -- keep going
> end function
>  
> exit_code = walk_dir("C:\\euphoria\\Mycars", routine_id("look_at"),
> TRUE)"
> How does TRUE exist?
> Do I create a constant TRUE or does it exist in another file?
> Jvandal
> 
> 
> 
> TOPICA - Start your own email discussion group. FREE!
> 
> 
> -- 
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.548 / Virus Database: 341 - Release Date: 5/12/03
> 


---


--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu