$CurrentLink

$CurrentLink

is the LinkObject representing the WSTP connection for an external program currently being installed or being called.

Details

  • $CurrentLink is temporarily set by Install and by ExternalCall.
  • You can use $CurrentLink to distinguish between several instances of an external program running at the same time.
  • $CurrentLink can be included in :Pattern: and :Arguments: WSTP template specifications, and will be evaluated at the time when Install is called.

Examples

Basic Examples  (1)

Set the directory:

Install two instances of external WSTP-compatible programs:

Get usage information about linked-in symbols:

$CurrentLink is used keep track of different persistent variables:

Update the value of the link1 counter:

Check the value of the two counters:

Terminate the external programs:

Reset to the original directory:

Wolfram Research (1996), $CurrentLink, Wolfram Language function, https://reference.wolfram.com/language/ref/$CurrentLink.html.

Text

Wolfram Research (1996), $CurrentLink, Wolfram Language function, https://reference.wolfram.com/language/ref/$CurrentLink.html.

CMS

Wolfram Language. 1996. "$CurrentLink." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$CurrentLink.html.

APA

Wolfram Language. (1996). $CurrentLink. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$CurrentLink.html

BibTeX

@misc{reference.wolfram_2023_$currentlink, author="Wolfram Research", title="{$CurrentLink}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/$CurrentLink.html}", note=[Accessed: 18-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_$currentlink, organization={Wolfram Research}, title={$CurrentLink}, year={1996}, url={https://reference.wolfram.com/language/ref/$CurrentLink.html}, note=[Accessed: 18-March-2024 ]}