View Single Post
  #1   Spotlight this post!  
Unread 30-09-2015, 07:53
Ari423's Avatar
Ari423 Ari423 is offline
LabVIEW aficionado and robot addict
AKA: The guy with the yellow hat
FRC #5987 (Galaxia)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2012
Location: Haifa, Israel
Posts: 540
Ari423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant future
Get/Set Refnum vs Global

On my team, we always store refnums using the Get and Set Refnum methods to store references to pieces of the robot across VIs. When I was looking at some other teams' code, I noticed that some teams ignore the Get and Set Refnum methods and store the refnums in global variables. I can see that both work, but I would imaginge one is better than the other. Can someone with more knowledge of how the Get and Set methods work explain the pros and cons of using them over global variables?
__________________
2017-present: Mentor FRC 5987
2017-present: CSA for FIRST in Israel
2012-2016: Member FRC 423
2013: Programmer
2014: Head Programmer, Wiring
2015: Head Programmer, Wiring
2016: Captain, Head Programmer, Wiring, Manipulator, Chassis, CAD, Business, Outreach (basically everything)


Reply With Quote