# Crash when clearglobal used in a function (scilab 2024)

**URL:** <https://scilab.discourse.group/t/crash-when-clearglobal-used-in-a-function-scilab-2024/662>\
**Category:** GUI\
**Created:** [October 4, 2024, 6:59am UTC](https://scilab.discourse.group/t/crash-when-clearglobal-used-in-a-function-scilab-2024/662 "2024-10-04T06:59:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ctcelik](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@ctcelik](https://scilab.discourse.group/u/ctcelik)\
**Post date:** [October 4, 2024, 6:59am UTC](https://scilab.discourse.group/t/crash-when-clearglobal-used-in-a-function-scilab-2024/662/1 "2024-10-04T06:59:38Z")

</div>

I have come across a problem of windows forcing to close scilab 2024 version when I try to use “clearglobal variable Name” command in a function as variable\_Name has been declared global in main program script.  
Can anyone help on this issue?

---

<div class="post-metadata">

**Author:** ![mottelet](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/mottelet/32/13_2.png) [@mottelet](https://scilab.discourse.group/u/mottelet)\
**Post date:** [October 4, 2024, 7:23am UTC](https://scilab.discourse.group/t/crash-when-clearglobal-used-in-a-function-scilab-2024/662/2 "2024-10-04T07:23:36Z")

</div>

Hello, and welcome to Scilab’s Discourse !

Can you provide a simple example (with code) ?

S.
