Index: mttroot/mtt/bin/trans/make_stdin ================================================================== --- mttroot/mtt/bin/trans/make_stdin +++ mttroot/mtt/bin/trans/make_stdin @@ -117,23 +117,19 @@ ColumnVector mttu (MTTNU); // Set up the mttu vector #ifndef STANDALONE - static int MTT_input_row; - static int MTT_input_last; - - Matrix MTT_input = get_global_value ("MTT_input").matrix_value(); - mttu = MTT_input.row (MTT_input_row); - - if (0 == MTT_input_row) - { - MTT_input_last = (MTT_input.length() / mttu.length()) - 1; - } - if (MTT_input_row < MTT_input_last) - { - MTT_input_row++; + int MTT_input_index = static_cast(get_global_value ("MTT_input_index").double_value ()); + int MTT_input_last = static_cast(get_global_value ("MTT_input_last").double_value ()); + Matrix MTT_input = get_global_value ("MTT_input").matrix_value(); + + mttu = MTT_input.row (MTT_input_index); + + if (MTT_input_index < (MTT_input_last - 1)) + { + set_global_value ("MTT_input_index", static_cast(++MTT_input_index)); } #else double t, u; strip_comments (cin);