Project

General

Profile

Actions

Added in 1.9.2

$~[identifier]

A identifier prefixed with "~" executes normally if the identifier exists, and otherwise returns $null without generating a missing identifier warning if that's enabled. This also ensures that it cannot execute a custom alias of that same name.

//echo -a $ticksqpc and $~ticksqpc

In this example, the 1st $ticksqpc executes the built-in identifier if the script runs in a version new enough to contain that identifier. In older versions, it could execute a custom alias if it exists as that name, and otherwise would either return $null or trigger the optional identifier warning.

The 2nd $~ticksqpc never executes a a custom alias, and either executes a built-in identifier existing by that name, or in too-old versions returns $null without triggering the optional identifier warning.

Updated by Paul Janson about 3 years ago · 2 revisions

Also available in: PDF HTML TXT