[/COLOR][/SIZE][/FONT]variable a : std_logic_vector(4 downto 0) := (others => '0'); variable b : std_logic_vector(31 downto 0 [FONT=arial, sans-serif][SIZE=5][COLOR=#333333] [/COLOR][/SIZE][/FONT]if b /= a then[FONT=arial, sans-serif][SIZE=5][COLOR=#333333]
8 replies to this topic
#1
Posted 08 November 2011 - 05:05 AM
What the result of this "if"?
|
|
|
#2
Posted 08 November 2011 - 10:39 AM
This looks like homework. We'll help with homework, but we won't do it for you. Do you know what /= does?
sudo rm -rf /
#3
Posted 08 November 2011 - 03:37 PM
dargueta said:
This looks like homework. We'll help with homework, but we won't do it for you. Do you know what /= does?
This is exactly what I'm asking. I know in C:
a /=b ==> a = a / b
But I do not know what is checked in the "if"
#4
Posted 08 November 2011 - 03:52 PM
#5
Posted 08 November 2011 - 04:09 PM
#6
Posted 08 November 2011 - 06:45 PM
Generally, in C, the following code would output 'abcd' :
Whatever's inside the parentheses would get executed, and then the result gets compared to anything that can be defined as 'nothing' .
int a;
if (a= 0) printf ("dcba");
else printf ("abcd");
Whatever's inside the parentheses would get executed, and then the result gets compared to anything that can be defined as 'nothing' .
#7
Posted 08 November 2011 - 08:16 PM
#8
Posted 08 November 2011 - 09:54 PM
dargueta said:
/= is equivalent to != in C.
Are you sure it's C?
#9
Posted 08 November 2011 - 10:02 PM
RhetoricalRuvim said:
Are you sure it's C?
If I were to guess, I believe they try to describe the symbol ≠ (not equal) with slash-equal.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









