#import <flx.flxh>
open Debug;

print "Hi!"; endl;
noinline fun d()= {
  var x = FLX_SRCLOC;
  var cf = CPP_FILE;
  var cl = CPP_LINE;
  var f = filename x;
  var sl = startline x;
  var sc = startcol x;
  var el = endline x;
  var ec = endcol x;
  return cf,cl,f,sl,sc,el,ec;
}

cf,cl,f,sl,sc,el,ec := d();
print$ cf+"("+str cl+"): "+f;
print$ "("+str sl+","+str sc+" --> " + str el + "," + str ec+")"; endl;
---------------------------

[EMAIL PROTECTED]:/work/felix/flx$ flx --test --force t
Hi!
t.cpp(47): t.flx(5,10 --> 15,1)

-----------------------

Unfortunately, the srcref is sometimes bogus.. but the
code seems to work :)

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to