Jump to content
UBot Underground

[HowTo]..set var scope more easy


Recommended Posts

Hi folks

here i show u my methode to handle the scope of variables inside a define.

it is a pain in the a.. to debug if u got really big threads with a lot of vars inside 
u need set every var every list in the define as "Global" if u wanna debug them

and after done u have to change that for your threads again to "Local".

 

Sure u can do that with Search/Replace in ya fav. Editor but here is an easyer methode to do that

 

set a var outside your defines

i called #theScope

set(#theScope"Global""Global")
 

then instead to set the scope to Local or Global use this

define mydefine {
    set(#var1"newval1"#theScope)
    set(#var2"newval2"#theScope)
    set(#var3"newval3"#theScope)
}

 

if u ready done with your Debug-things set the #theScope to

set(#theScope"Local""Global")

 

this save a lot of work and time

 

hope u like this tut!

 

 

 

  • Like 8
Link to post
Share on other sites

That's a smart workaround, Arno...

Personally, I prefer a replace in a text editor - but your method is very good too. Kudos!

  • Like 1
Link to post
Share on other sites
  • 2 months later...
  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...