Skip to content

useful variables and tools

Michael Baas edited this page Dec 13, 2021 · 1 revision

We don't want to "pollute" the namespace that we're building with your script, so all variables and functions discussed here will be assigned and live in the namespace where DBuild is executed in. You can refer to it in your code using 1⊃⎕RSI. It is common practice in Dyalog to assign that to variable, i.e. db←1⊃⎕RSI ⍝ DBuild's home, and then refer to it using that name, ie. db.quiet.

Variables

path

The path-variable contains the name of the folder that contains the currently active .dyalogbuild-file.

quiet

This indicates if the -quiet-flag was used on the commandline of ]DBuild. You may use it optionally suppress/generate session-output in your own code (that is executed during the Build-process)

Common variables

The following variables are available to DBuild and DTest. They contain information about the platform. Note, however, that different namespace-paths might be required to access them (## or db, as discussed earlier). NB: the term "platform" refers to the platform that the Code is executed on - not a theoretical "target-platform".

_isClassic

Boolean indicating whether we're running on a Classic-Platform.

_is32bit / _is64bit

Booleans indicating the "bitness" of the platform

_isWin / _isLinux / _isAIX / _isUnix / _isMacOS / _isSolaris

Flags to distinguish the platform.

_DotNet

  • 0: not found
  • 1: .net Framework
  • 2: .Net Core

_Version

The 4 numbers that form a Dyalog-Version in a numeric vector.

Clone this wiki locally