Jump to content

is it possible that a lisp file can read it's own location?


svorgodne

Recommended Posts

LISP does not suffer the benefit of being able to identify the location of where the executing code has been loaded from (the actual .LSP, .FAS, or .VLX file), in the same way a .NET assembly can use:

 

string executingCodeFile = System.IO.Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().Location);

 

 

 

Your best available option, is to assume that the code file resides within the Support File Search Path (SFSP), and query its location by means of the FINDFILE Function... Which also implicitly requires one hard-code a known file name, and file extension as well (or iterate potential values).

 

Cheers

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...