---
title: "How to remove allocated value of a specific variable in Erlang?"  
description: "How to remove allocated value of a specific variable in Erlang?"  
author: "Anonymous User"  
published: 2016-03-09  
updated: 2016-03-09  
canonical: https://www.mindstick.com/forum/34044/how-to-remove-allocated-value-of-a-specific-variable-in-erlang  
category: "erlang"  
tags: ["erlang"]  
reading_time: 1 minute  

---

# How to remove allocated value of a specific variable in Erlang?

Can [anyone tell me](https://www.mindstick.com/interview/23033/can-anyone-tell-me-about-hadoop-toolbox) that if I bound the [variable](https://www.mindstick.com/articles/1807/objective-c-data-types-variables-object-creation) with incorrect [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages) then how can I [replace](https://yourviews.mindstick.com/view/81330/cow-antibody-research-in-usa-a-step-ahead-to-replace-plasma-therapy) with another value.for example: I have create a variable in Erlang shell:> One = 2. // by [mistake](https://yourviews.mindstick.com/view/88393/ai-humanity-s-greatest-invention-or-final-mistake) bound wrong value in variable One.2> One = 1. // if we again bound with new value then it generates [error](https://yourviews.mindstick.com/view/88527/fixing-quickbooks-error-4120-reinstalling-vs-repairing)."[exception](https://www.mindstick.com/articles/1824/objective-c-exception-handling) error: no match of [right](https://www.mindstick.com/articles/12766/check-whether-you-are-doing-digital-transformation-right-or-not) hand side value 1"\
So [please tell me](https://www.mindstick.com/forum/33900/please-tell-me-what-are-the-technique-to-content-optimization) how to unbound any specific variable.Thanks.

## Replies

### Reply by Tarun Kumar

The Variable which is already bounded then you can't bound it again. In Erlang *operator (=)* is used for pattern match not for initialization. But If the Variable is unbound and we use operator (=) then data on the right-hand side will be bound on the left-hand side Variable.If you want to bound another data then you need to unbound that Variable first.In Erlang Shell you can use **f()** function to unbound all the Variables. and to unbound any particular Variable use **f(Variable_Name)**.For Example:

```
> One = 2.2> f(One).ok> One = 1.1
```

Now, Variable One is bounded with value 1.That's it.


---

Original Source: https://www.mindstick.com/forum/34044/how-to-remove-allocated-value-of-a-specific-variable-in-erlang

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
