Result of Simple Comparison

From: jaym1212 (spamtrap_at_crayne.org)
Date: 01/21/05


Date: Thu, 20 Jan 2005 23:17:02 +0000 (UTC)

In C, the following code results in var x being assigned 1...

int y = 234;
int z = 234;
int x = (y == z);

... however, I wanted x to equal 234 without additional code.
Is this possible at assembly level, without incurring the equivalent of
an if statement? TIA



Relevant Pages

  • Re: check to see if value can be an integer instead of string
    ... > have looked at is int, but what is comming out is a string that may ... The "int" builtin function never returns any value but an integer. ... > var = some var passed to my script ...
    (comp.lang.python)
  • Re: Passing const int * to a function
    ... For var to be constant the declaration of f should be ... int f ... int f (const int *const var) ... Bounce first left and then right and then continue in this same ...
    (comp.lang.c)
  • Re: template for function pointer
    ... > void multi(double* arrayPtr, int len){ ... > var is defined. ... > incoming array with the double value. ... > is not a function pointer, it will never go into case 2 in the switch ...
    (comp.lang.cpp)
  • Re: Postfix increment
    ... specification doesn't contain a strict evaluation order of arguments. ... Now that we have that we can look at the difference between var++ and ... int varPlusPlus ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: why this code doesnt work!!
    ... Saksena wrote: ... > typedef T var; ... > int main ...
    (comp.lang.cpp)