1. Rob Questions

-- using version 2.1

What does the " with 744614121 " note mean at the bottom of some
include files.

Why do I get the following error -- true/false condition must be an ATOM
for the following code excerpt.

-- v is a sequence

if v[i] != " " to
  -- take some action
end if

bernie

new topic     » topic index » view message » categorize

2. Re: Rob Questions

At 02:47 PM 5/12/99 -0400, you wrote:
>Why do I get the following error -- true/false condition must be an ATOM
>for the following code excerpt.
>
>-- v is a sequence
>
>if v[i] != " " to
>  -- take some action
>end if

If v[i] is an atom, use

        if v[i] != ' ' then

The single quotes denote an atom type, whereas the double quotes denote the
sequence type. And you can't use != on sequence comparisons (I think).

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

3. Re: Rob Questions

> -- using version 2.1
>
> What does the " with 744614121 " note mean at the bottom of some
> include files.

it tells the Eu "compiler" to let that file be considered 0 statements,
allows all of the standard include files to not hurt your statement count of
300 (and some non-standard one's too).

Adam Weeden

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

4. Re: Rob Questions

Bernie Ryan wrote:

> -- using version 2.1
>
>What does the " with 744614121 " note mean at the bottom of some
>include files.

Um...directly above it should be this line:

 -- In Euphoria 2.1 this file (unless modified) is FREE - 0 statements.

It's the "with" line that actually "tells" Euphoria that the include file is
"free."


>Why do I get the following error -- true/false condition must be an ATOM
>for the following code excerpt.
>
> -- v is a sequence
>
>if v[i] != " " to
>  -- take some action
>end if

If you're looking for a single char, use single quotes around the space.

However, if you're comparing string values, you have to change the "if" line
to this:

if not equal(v[i], " ") then
 -- or
if compare(v[i], " ") != 0 then

Remember, the double-quoted string " " is equivalent in Euphoria to the
sequence {32}. If v[i] is an atom, then the expression v[i] != " "
evaluates to {1} or {0}. This is why you're getting the error message
requiring your condition to be an atom, because it currently isn't. You
must use equal() or compare() for conditional logic involving sequences
(or strings -- they're the same thing in Euphoria).


Be seeing you,
   Gabriel Boehme


 ------
A false film might be refuted in a hundred books, without much affecting
the million dupes who have never read the books but only seen the film.

G.K. Chesterton
 ------

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

5. Re: Rob Questions

Thanks Everybody for your replys. I forgot to use single quotes

I understand about the 300 count.

But I still want Rob to tell me if this should be
comment out or in if you are registered user.
Does it effect performance.
What does the seceret number represent.

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

6. Re: Rob Questions

>But I still want Rob to tell me if this should be
>comment out or in if you are registered user.

There would be no need to comment the lines out as registered users don't have
any restrictions of file size.

>Does it effect performance.

The performance probably wouldn't be effected as
1. The regestered version probably doesn't even check for it, and
2. The small amount of overhead calculated once for each include file happens
hopefully before the main part of your program begins execution, if your worried
about a couple of micro seconds before your program begins removing the with
statements "might" help.

>What does the seceret number represent.
I would assume it would be some kind of secret checksum. Somewhere in the doco
I think I saw it mentioned you could change the includes a little and it still
would use a zero count meaning it is probably an approximate checksum.

Ray Smith

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

Search



Quick Links

User menu

Not signed in.

Misc Menu