Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Clarion > how to know fil...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 9031 of 9097
Post > Topic >>

how to know filename/linenumber of code under execution?

by Luca Arzeni <l.arzeni@[EMAIL PROTECTED] > Feb 2, 2008 at 07:44 PM

Hi there,

I'm working with

Clarion 6.3.9056
Windows XP

I need a way to know the filename and fileline of file which is under
compilation to popup them in a message box like the ASSERT() clarion
function does.

If you put an ASSERT(FALSE) statement in your code, you will see that,
when
the program flow reaches that statement it show a popup say something like

'Assert failed on file xxx.clw at line NNN'

Degugging the code I can see that, at assembly level, the compiler load on
register eax the name of the filename and on ebx the linenumber, so I know
for shure that it knows this information

In a C/CPP compiler you have two macros

__FILE__
and
__LINE__

that get expanded when it is run the c preprocessor (and does this macro
expansion), so I could write something like

 MESSAGE( __FILE__ )

and reach my goal.


Any idea how to get this info in a clw file?

Thanks, Luca


-- 

--
Luca Arzeni




 2 Posts in Topic:
how to know filename/linenumber of code under execution?
Luca Arzeni <l.arzeni@  2008-02-02 19:44:25 
Re: how to know filename/linenumber of code under execution?
Luca Arzeni <l.arzeni@  2008-02-03 00:29:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 21:38:13 CDT 2008.