On Mar 23, 2005, at 8:50 AM, Frank D. Engel, Jr. wrote:

No, in C the meaning of a statement depends only on declarations in the context and its location.

Oh?

#define myFunc(x, y) ((sizeof(x) > sizeof(y)) ? ((x) + (y)) : ((x) * (y)))


Now we have what appears to be a function, but which is dependent on the data types of the arguments. This is in plain, ordinary C. Place this in a header file, and given only the body of a C program which uses it, we get the same level of confusion.

Hmmm.

Well, not the same level of confusion.

The meaning of a name in Revolution--container or literal--depends on its usage beyond a particular instance. The meaning of an instance of myFunc() depends only on the macro definition, its particular usage, and the location of each. On the other hand, the meaning of a name in Revolution depends on some indefinite number of statements that also use the name in that handler.

Very few can articulate that dependency. I have to go look it up in my notes. I use a language subset, so it is not critical to my work, but if I was reviewing another's source, I might have to look that up. Even then, because the dependency is not simple, I wouldn't be completely sure. And besides, some bug fixes might have changed that.

Dar

--
**********************************************
    DSC (Dar Scott Consulting & Dar's Lab)
    http://www.swcp.com/dsc/
    Programming Services and Software
**********************************************

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to