--- parser3/src/main/pa_table.C 2001/05/08 08:14:56 1.29 +++ parser3/src/main/pa_table.C 2001/08/10 07:04:44 1.35 @@ -4,9 +4,8 @@ Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - - $Id: pa_table.C,v 1.29 2001/05/08 08:14:56 paf Exp $ */ +static const char *RCSId="$Id: pa_table.C,v 1.35 2001/08/10 07:04:44 parser Exp $"; #include @@ -16,7 +15,7 @@ Table::Table(Pool& apool, const String *aorigin_string, - Array *acolumns, + const Array *acolumns, int initial_rows) : Array(apool, initial_rows), @@ -43,10 +42,13 @@ int Table::column_name2index(const Strin } else { // nameless char *error_pos=0; int result=(int)strtol(column_name.cstr(), &error_pos, 0); - if(error_pos && *error_pos) - THROW(0, 0, - &column_name, - "invalid column number"); + if(error_pos && *error_pos) { + result=-1; // calm, compiler + if(bark) + THROW(0, 0, + &column_name, + "invalid column number"); + } return result; } } @@ -61,13 +63,14 @@ const String *Table::item(int column) co } bool Table::locate(int column, const String& value) { + int scurrent=fcurrent; for(fcurrent=0; fcurrent