Hi Ox-Users,
I think the trace for a run-time error thrown because of an uninitialized
variable sometimes seem to show the wrong line number (at least for Ox3.3
under Linux).
???
Max
--- sample code ---
#include <oxstd.h>
main()
{
decl something;
// Use something without initializing it on line 9.
// This should throw an error indicating line 9.
decl something_else = something+5;
decl some_other_variable;
// The backtrace actually indicates line 14:
decl and_another_one;
}
--- end of sample code ---
--- sample code with line numbers ---
1 #include <oxstd.h>
2
3 main()
4 {
5 decl something;
6
7 // Use something without initializing it on line 9.
8 // This should throw an error indicating line 9.
9 decl something_else = something+5;
10
11 decl some_other_variable;
12
13 // The backtrace actually indicates line 14:
14 decl and_another_one;
15 }
--- end of sample code with line numbers ---
--- output ---
Ox version 3.30 (Linux) (C) J.A. Doornik, 1994-2003
Runtime error: variable has no value
Runtime error occurred in main(14), call trace:
test.ox (14): main
--- end of output ---
|