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

CompileGetConstant() public method

public CompileGetConstant ( object obj ) : void
obj object
return void
        public void CompileGetConstant(object obj)
        {
            this.CompileByteCode(ByteCode.GetConstant, this.CompileConstant(obj));
        }

Usage Example

Example #1
0
        public void DecompileGetConstants()
        {
            Block block = new Block();
            block.CompileGetConstant(1);
            block.CompileGetConstant("foo");
            BlockDecompiler decompiler = new BlockDecompiler(block);

            var result = decompiler.Decompile();

            Assert.IsNotNull(result);
            Assert.AreEqual(2, result.Count);
            Assert.AreEqual("GetConstant 1", result[0]);
            Assert.AreEqual("GetConstant \"foo\"", result[1]);
        }
All Usage Examples Of AjTalk.Language.Block::CompileGetConstant