Skip to content

Instantly share code, notes, and snippets.

@tueda
Last active August 29, 2015 13:56
Show Gist options
  • Save tueda/9188133 to your computer and use it in GitHub Desktop.
Save tueda/9188133 to your computer and use it in GitHub Desktop.
GlobalFlag[name_String] := Module[{s},
s = "Global`" <> name;
If[NameQ[s],
TrueQ[Symbol[s]]
,
False
]
];
GlobalValue[name_String, default_:0] := Module[{s},
s = "Global`" <> name;
If[NameQ[s],
Symbol[s]
,
default;
]
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment