[Ns-developers] Bug 215 Name Container

Gustavo Carneiro gjcarneiro at gmail.com
Mon Dec 1 10:37:10 PST 2008


2008/12/1 <craigdo at ee.washington.edu>

> > >  NameList::Add (devices.Get (3), "Node 3/eth0");
> >
> > Here I think the arguments should be swapped.  Normally we are used to
> > assignment where the identifier comes before the value.  It
> > is that way in
> > Assembly, C, and Python (PyObject_SetAttrString(object,
> > "string", value)).
> > I'm sure there are more examples of prior art that I could find... :-)
>
> Well, I think in Python you would probably do something like
>
>  copy (source, destination)


Not really.


>
>
> but in C and assembler you would probably see
>
>  copy (destination, source)  or
>  assign (identifier, value)


Precisely.  I was more thinking of simple variable assigment:

    foo = 3;


>
>
> That is exactly what I did in this case.


That is precisely what you did _not_ do in this case :-)

>From your example:

   NameList::Add (devices.Get (3), "Node 3/eth0");

What do you call identifier, and what do you call value, in this case?


-- 
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert


More information about the Ns-developers mailing list