예제 #1
0
파일: Formula.cs 프로젝트: emtees/old-code
			ErrorValue TryError (string error, ErrorValue ret)
			{
				if (error == null)
					throw new Exception ("Invalid error");
				
				string sub = s.Substring (pos);
				
				if (s.StartsWith (error)){
					pos += error.Length;
					return ret;
				}
				return null;
			}
예제 #2
0
            ErrorValue TryError(string error, ErrorValue ret)
            {
                if (error == null)
                {
                    throw new Exception("Invalid error");
                }

                string sub = s.Substring(pos);

                if (s.StartsWith(error))
                {
                    pos += error.Length;
                    return(ret);
                }
                return(null);
            }