MyC.Io.Abort C# (CSharp) Method

Abort() public method

public Abort ( string s ) : void
s string
return void
public void Abort(string s)
  {
  StringBuilder sb = new StringBuilder();
  sb.Append(ifilename);
  sb.Append("(");
  sb.Append(curline+1);
  sb.Append(") : error M0000: ");
  sb.Append(s);
  Console.WriteLine(sb.ToString());
  throw new ApplicationException("Aborting compilation");
  }

Usage Example

        VarList paramList()
        {
            VarList v;

            tok.scan();
            if (tok.getFirstChar() != '(')
            {
                io.Abort("Expected '('");
            }

            v = new VarList();  /* init the param list */
            tok.scan();         /* get the next token */
            while (tok.getFirstChar() != ')')
            {
                Var e = new Var();
                e.setClassId(Tok.T_PARAM);     /* mark this as a parameter */
                dataType(e);                   /* get the specified datatype */
                e.setName(tok.getValue());     /* copy the variable name */
                v.add(e);                      /* add parameter to param list */
                tok.scan();
                if (tok.getFirstChar() == ',') /* if more params */
                {
                    tok.scan();                /* get the next token */
                }
            }
            tok.scan(); /* move to the next token */
            return(v);
        }
All Usage Examples Of MyC.Io::Abort