Back
Close

Computing with Data

elgeish
104.5K views

Scope

The code below demonstrates masking the built-in constant pi by a global environment variable with the value 3, and retrieving the original value after clearing it:

pi # a built-in constant whose value is 3.141593
pi = 3 # redefines variable pi
pi # .GlobalEnv match
rm(pi) # removes masking variables
pi # back to 3.141593
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants