In a statement containing two or more operators of same precedence, how the expression will be solved?

In a statement containing two or more operators of same precedence, how the expression will be solved?
A. Left to right
B. Right to left
C. Alphabetically
D. In a random manner
 
Answer: a
Explanation: In VHDL, to solve any expression a simple rule is followed. The rule is “highest precedence first, left to right within same precedence”. However, we can use parenthesis to control the order of operations, but by default it will solve left to right. It may be noted that parenthesis is the operator with highest precedence.
 

Tìm kiếm

Back
Top