Re: what is the assignment expression return value?



On May 14, 12:16 pm, vlsidesign <ford...@xxxxxxxxx> wrote:
I believe in C, an assignment expression returns the value of the left
side of the assignment. For example, a = 2, would return 2.

If this is true, is Skill similar? For instance, if I have the
following, a = nil, would it return nil ?

It seems like it would return nil but for different reason than C. I
believe it returns the value of the expression on the right side that
happens to be what is assigned to a.
.



Relevant Pages

  • Re: assignment method semantics
    ... However, if it really *is* assignment, I'd expect myMaterial.texture ... to be nil after a reading of a non-existent filename. ... IMHO the questionable part is that a setter can actually fail because ... Maybe not a setter should be used here but an ordinary method. ...
    (comp.lang.ruby)
  • Re: execute all over the whole DBF
    ... the skip command issued after the assignment ... you store its Recnoto a var (nNextRecno). ... or exit the loop if it is NIL. ... But in executions it is executed in the first matched record. ...
    (comp.lang.clipper)
  • Re: Is Assignment in a Conditional an Idiom?
    ... The result of evaluating an assignment is the new value of the variable. ... assignment operators are evaluated right to left as opposed to other operators. ...
    (comp.lang.ruby)
  • Re: Riddle me this (a question about expressions)
    ... dealt with as a syntax error just because it has an assignment to its ... I'm pretty sure that x is nil because of the thing where the parser ... sees an assignment and defines the variable. ...
    (comp.lang.ruby)
  • Re: Riddle me this (a question about expressions)
    ... As shown above, raise seems to return ... nil, and return seems like it should return a similar value if there ... because raise doesn't exit the current stack frame (it can be rescued ... of assignment is always resolved before it is assigned). ...
    (comp.lang.ruby)