Results 1 to 2 of 2

Thread: .pas filename obtaint via a const in the code?

  1. #1
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    .pas filename obtaint via a const in the code?

    is it possible to obtain the current file via a code constant? In C++ you can get the with __FILE__. Could this be done in Pascal/Delphi?

    The reason I ask is for debugging purposes. I want the file name + line where the code breaks to speed up the development process.
    NecroSOFT - End of line -

  2. #2

    Re: .pas filename obtaint via a const in the code?

    AFAIR Free Pascal allows something like {$include %FILE%} and {$include %LINE%}
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •