1. dumb C question (part 2)

Another dumb C translation question >

// in C
 }
  else if(playOK && (code == HC_SKIP)) curmess++;

-- in Euphoria

elsif and_bits(playOK , code) = HC_SKIP then
       curmess += 1

I understand how to do things like this pretty well but,
heres where I get confused

// in C

s = !s;

-- in Euphoria

would it be:

if not s then 
or 
s = not s (hehe just joking)

I'm lost and it seems the most simple things throw me.....

Please, Help.

euman at bellsouth.net

Euman

new topic     » topic index » view message » categorize

2. Re: dumb C question (part 2)

On Fri, 20 Apr 2001, Euman wrote:

> Another dumb C translation question >

> heres where I get confused
> 
> // in C
> 
> s = !s;
> 
> -- in Euphoria
> 
> would it be:
> 
> if not s then 
> or 
> s = not s (hehe just joking)

Yes. 
These give the same results:

// C 
#include <stdio.h>

int main()
 {
 int s;
 s = 3;
 s = !s;
 printf("%d",s);
 }

-- Euphoria
atom s
s = 3
s = not 3
printf(1,"%d",s)

Regards,
Irv

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

3. Re: dumb C question (part 2)

Correct me if I'm wrong but I would have thought that

> // in C
>  }
>   else if(playOK && (code == HC_SKIP)) curmess++;

would have given

elsif playOK and ( code = HC_SKIP ) then
    curmess += 1
end if

It is & for bit_and and && for logical_and in C?

Bruce.

P.S. Yeah, it me. I couldn't stand to be offline so I've resubscribed
through my hotmail account.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu