R
robotman
Is there a way to write a function to increment a variable (i.e. to
replace "myvar = myvar + 1")?
For example, I would like to create a custom function called "inc" so I
can do:
inc myvar
This would require somehow passing a variable name to the function
(which I don't see how is possible).
Any other ideas how to get around the "myvar = myvar + 1" ?
Thanks!
replace "myvar = myvar + 1")?
For example, I would like to create a custom function called "inc" so I
can do:
inc myvar
This would require somehow passing a variable name to the function
(which I don't see how is possible).
Any other ideas how to get around the "myvar = myvar + 1" ?
Thanks!