Debugging

Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.

Debugging

Postby luching » Thu Feb 17, 2011 4:30 pm

I thought this was rather trivial but I am trying to figure out the best way to deal with this. Suppose RATS throws up an error like this:

The Error Occurred At Location 5041 of loop/block
Line 224 of loop/block

What can be the best and a quick way to get the line numbers to check and debug? Does it help if every line not used is commented by using * ? I know in Matlab, the exact line number corresponds to the matlab editor when the codes are written with or without "blank" lines. The same is true for GAUSS; I can find the exact line number using an editor like notepad++.
luching
 
Posts: 31
Joined: Mon Jun 07, 2010 4:05 pm

Re: Debugging

Postby TomDoan » Thu Feb 17, 2011 6:19 pm

The "count" for a loop/block, procedure or function starts with the DO, PROCEDURE or FUNCTION (ignoring any comments that come before it) but counts any comments after that. The simplest way to find line 224 is to go the start of the loop, see what the line number is (on the status bar at the bottom of the application window), add 223 to it, and page down to find that.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm


Return to Help With Programming

Who is online

Users browsing this forum: No registered users and 0 guests