//for type checking of the case labels to work, the type of expression used above needs to be passed down to the switch blocks. public override void TypeCheck() { this.expression.TypeCheck(); if (!expression.type.isTheSameAs(new NamedType("INT"))) { System.Console.WriteLine("Type error in SwitchStatement\n"); throw new Exception("TypeCheck error"); } foreach (SwitchBlockGroup Blk in block) { Blk.setswichExprType(expression.type); Blk.TypeCheck(); } }
private void InitFactors() { FieldInfo[] fieldNames = typeof(FactorsForm).GetFields(); foreach (FieldInfo fieldName in fieldNames) { fieldName.SetValue(this, double.Parse(ConfigurationManager.AppSettings[fieldName.Name])); } pts_textBox.Text = Pts.ToString(); reb_textBox.Text = Reb.ToString(); ast_textBox.Text = Ast.ToString(); stl_textBox.Text = Stl.ToString(); blk_textBox.Text = Blk.ToString(); to_textBox.Text = To.ToString(); tpm_textBox.Text = Tpm.ToString(); ftPer_textBox.Text = FtPer.ToString(); fgPer_textBox.Text = FgPer.ToString(); ftVol_textBox.Text = Fta.ToString(); fgVol_textBox.Text = Fga.ToString(); }