Monday, December 1, 2014

Understanding lvalues and rvalues in C and C++

lvalues stands for left-values and rvalues is right-values[2]

lvalue is an expression referring to an object

Data storage for rvalues describes in ASM.[1]

mov #1, n

we could see 1 is a contant number, not a variable. the rvalue 1 never appears as an object in the data space.

 

Reference

[1] http://ieng9.ucsd.edu/~cs30x/Lvalues%20and%20Rvalues.htm

[2] http://www.c4learn.com/c-programming/c-r-value-expression/

[3] http://eli.thegreenplace.net/2011/12/15/understanding-lvalues-and-rvalues-in-c-and-c experitment

No comments:

Post a Comment

Register Transfer Level Design with Verilog (1) [ebook]

設計程式之所以有趣不外乎是它的千變萬化,同樣的結果卻有不同的寫法。 但這些不同寫法當中也並沒有分誰對誰錯,也沒有制定標準來規範何事該用何解。 這也就是我們設計者的珍貴!! [1] Primitive Instantiations 在Verilog中最基本的邏輯...