AjTalk.Language.Interpreter.DoGetGlobalVariable C# (CSharp) Метод

DoGetGlobalVariable() приватный статический Метод

private static DoGetGlobalVariable ( ExecutionContext context ) : void
context ExecutionContext
Результат void
        private static void DoGetGlobalVariable(ExecutionContext context)
        {
            context.InstructionPointer++;
            byte arg = context.Block.ByteCodes[context.InstructionPointer];
            string name = context.Block.GetGlobalName(arg);
            object value;

            if (context.Self != null)
                value = context.Self.Behavior.Scope.GetValue(name);
            else
                value = context.Machine.CurrentEnvironment.GetValue(name);

            context.Push(value);
        }