Talk About Network

Google


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 > Re: how to know...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 9031 of 9121
Post > Topic >>

Re: how to know filename/linenumber of code under execution?

by Luca Arzeni <l.arzeni@[EMAIL PROTECTED] > Feb 3, 2008 at 12:29 AM

Luca Arzeni wrote:

> 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
> 
> 

I'm wandering if a template could do this. It should be executed each time
AFTER the generation of .clw files...

-- 

--
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 Sat Jul 26 3:11:15 CDT 2008.