Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lineno() returns 0 always

Status
Not open for further replies.

knela

Programmer
Jan 26, 2007
13
BR
Hello! My name is Pablo and I'm from Brazil. Because it, I request for you to forgive my english. My problem is: I created a form to receive errors codes e show it. In the main program (prg) I put this code:

ON ERROR do forms c:\foxpro\myprogram\forms\alert with program(),lineno()


In the init event of the form i put this code:

lparameters wprograma,wlinha
thisform.text1.value=wprograma
thisform.text2.value=wlinha
thisform.Refresh


But only the program name is showed, but the line of code (_lineno()), always return 0 (zero). What's wrong with it?
 
Nothing wrong, if you build your application w/o DEBUG information. When you build the EXE that way the compiler removes ALL code information from the EXE and that way it removes the information for line#.

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
MVP VFP
 
Thanks bborissov! So, how can I return the number of the line???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top