public byte CompileGlobal(string globalname) { int p = this.globalnames.IndexOf(globalname); if (p >= 0) { return (byte)p; } this.globalnames.Add(globalname); return (byte)(this.globalnames.Count - 1); }
public void CompileGlobalName() { Block block = new Block(); byte p = block.CompileGlobal("Class"); Assert.AreEqual(0, p); }