List of System Variables

Prev Next

Variable Name Variable Type Protection Settings Description
command line arguments[] numeral read only Number of command line arguments, at least 1
  ...[0] string full access 1st command line argument (typically the name of the B4P program file)
  ...[1, 2, ...] string full access Additional command line arguments if available


local settings[] void locked Following variables refer to local settings
  ...[locale] string read only Configured locale as part of locale settings. Use set locale() to change.
  ...[country name] string read only Configured country as part of locale settings. Use set locale() to change.
  ...[language] string read only Configured language as part of locale settings. Use set locale() to change.
  ...[currency symbol] string limited access Currency symbol as configured in locale settings
  ...[decimal separator] string limited access Typically 1 chracter, e.g. '.', ','
  ...[thousand separator] string limited access Typically 1 chracter, e.g. ',', '.', ' ', "'"
  ...[date format] string limited access E.g. "DD.MM.YYYY", "MM/DD/YY", etc. See date to string formatting parameters.
  ...[date format short] string limited access E.g. "DMY" or "MDY", used for resolving ambiguities in extracting dates from strings
  ...[date separator] string limited access Typically 1 chracter, e.g. '.', '/', '-'
  ...[time format] string limited access E.g. "HH:II:SS" Note the "I" for minute digits. See date to string formatting parameters.
  ...[time separator] string limited access Typically 1 chracter, e.g. ':'
  ...[list separator] string limited access Typically 1 chracter, e.g. ',', ';'. Used for CSV file format. Excel uses different symbols around the world.


libraries[] boolean prevent deleting This system variable is reserved for libraries to add structured info such as version and other important info. It helps to unclutter the global variable space.


runtime settings[] void locked Following variables refer to run-time settings
  ...[crlf] boolean limited access If true, then new-lines in files saved will be CR+LF, otherwise just line feed (LF). For Linux and MACOS releases, this variable is true, for Windows it is false.
  ...[epsilon] numeral limited access Epsilon as numeric tolerance value used for comparisons. E.g. values below epsilon may be interpreted as zero. Inital value is 1E-09.
  ...[exit directly] boolean limited access Normally false, i.e. user must press [Enter] to finally leave the program and the console window may close. If set to true, then B4P programs exist directly.
  ...[search files ignore case] boolean limited access Normally true under Windows and false under Linux/MACOS. In Windows systems, finding files is not case sensitive.
  ...[input file character set] string limited access Default character set assumed if text file are loaded, are not of UTF-16 type and have no byte order marks, and too few special symbols were inside to recognize the files properly. Presently, its win-1252 for Windows and utf-8 for Linux/MACOS systems.
Following character sets are supported: ansi, iso8859-1, win1252, utf-8, utf-16, utr-16 big endian.
  ...[output file character set] string limited access Default character set assumed for saving files if no other format specified. Presently it's utf-8.
  ...[memorize table columns] boolean limited access See memory effect regarding table header names begin memorized. Set to false to deactivate memorizing.
  ...[prompt] string limited access Current prompt as used in the interactive mode. Change it using the prompt() function.
  ...[registry my space] string limited access Obsolete.
  ...[verbose] string limited access Verbose levels. See verbose for more details.
  ...[found main] boolean read only true if B4P was started without a specified B4P program file, but has found 'main.b4p' in the current or starting directory.


system info[] void locked Following variables refer to operating-system specific characeristics
  ...[app data directory] string read only Local machine application data directory
Windows: "C:\ProgramData\b4p"
Linux/MACOS: "/home/user name/.config"
  ...[app data directory b4p] string read only Local machine application data directory with B4P subdirectory
Windows: "C:\ProgramData\b4p"
Linux/MACOS: "/home/user name/.config/b4p"
  ...[user app data directory] string read only User application data directory
Windows: "C:\Users\user name\AppData\Local"
Linux/MACOS: "/home/user name/.config"
  ...[user app data directory b4p] string read only User application data directory with B4P subdirectory
Windows: "C:\Users\user name\AppData\Local\b4p"
Linux/MACOS: "/home/user name/.config/b4p"
  ...[bin directory] string read only Location of binary executable file
Windows: "C:\ProgramData\b4p"
Linux/MACOS: "/home/user name/.config/b4p"
  ...[program directory] string read only Program directory
Windows: "C:\ProgramData\b4p"
Linux/MACOS: "/usr/local/etc"
  ...[program directory b4p] string read only Program directory with B4P subdirectory
Windows: "C:\Program Files\b4p"
Linux/MACOS: "/usr/local/etc/b4p"
  ...[temp directory] string read only Directory for temporary data storage:
Windows: "C:\Users\user name\AppData\Local\TEMP"
Linux/MACOS: "/tmp"
  ...[user directory] string read only User directory after login:
Windows: "C:\Users\user name\"
Linux/MACOS: "/home/user name"
  ...[directory separator] string read only Windows: '\' and Linux/MACOS: '/'
  ...[operating system] string read only e.g. "Windows", "Linux", "MACOS"
  ...[operating system product] string read only e.g. specific Windows OS product like "Windows 10 Pro" or Linux distribution name like "Ubuntu"
  ...[user name] string read only Your login user name
  ...[user domain] string read only Your user domain
  ...[host name] string read only Name of your system
  ...[privileges] string read only Your privilege level for the operating system:
standard: Standard user privileges
elevated: Enhanced privileges, entitled to install software
administrator: Administrator privileges. Applicable if program is started with administration rights (e.g. 'sudo' added in front in Linux/MACOS systems)
  ...[operating system version] string read only Version number of installed operating system


time stamp[] void read only Provides date and time at start-up. Example under Windows: "Sat Oct 10 10:17:34 2020"
version info[] void read only Provides B4P version and release info