How do I get node name from @OpInput1

   2118   2   1
User Avatar
Member
2 posts
Joined: April 2016
Offline
Hi
I am trying to figure out how to get the name of the node at @OpInput1 using the attribute wrangler.
s@name = (@OpInput1,"$OS");
but I am only getting the current OP's name.
I am pretty new to this so I am not sure what went wrong.

Edit by ndickson: Added code block tags for formatting.
Edited by neil_math_comp - May 29, 2018 13:57:40
User Avatar
Member
1743 posts
Joined: March 2012
Offline
Does the following not work?

s@name = @OpInput1;

In most cases, if you put a comma after between two expressions, it makes a single expression that evaluates both sides, ignores the value of the first, and yields the value of the second, so:

s@name = (@OpInput1,"$OS");

would evaluate-but-ignore the value of @OpInput1, then would assign the "$OS"to s@name.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
7758 posts
Joined: Sept. 2011
Online
ndickson
In most cases, if you put a comma after between two expressions, it makes a single expression that evaluates both sides, ignores the value of the first, and yields the value of the second

Is it interpreted a ternary statement with an implied False Condition? I would expect a syntax error instead.
  • Quick Links