AjTalk.Language.Block.TryCompileSet C# (CSharp) Method

TryCompileSet() protected method

protected TryCompileSet ( string name ) : bool
name string
return bool
        protected virtual bool TryCompileSet(string name)
        {
            int p;

            if (this.localnames != null)
            {
                p = this.localnames.IndexOf(name);

                if (p >= 0)
                {
                    this.CompileByteCode(ByteCode.SetLocal, (byte)p);
                    return true;
                }
            }

            if (this.argnames != null)
            {
                p = this.argnames.IndexOf(name);

                if (p >= 0)
                {
                    this.CompileByteCode(ByteCode.SetArgument, (byte)p);
                    return true;
                }
            }

            p = this.GetInstanceVariableOffset(name);

            if (p >= 0)
            {
                this.CompileByteCode(ByteCode.SetInstanceVariable, (byte)p);
                return true;
            }

            return false;
        }