Quick start
Daksh source files use the .dax extension. The current public implementation runs in the browser through the Daksh web interpreter.
Variables
Use set for variable declaration
and reassignment. Use const
for constants.
Data types
The current core includes Integer, Float/Decimal, String/Text, Boolean, Null, List/Array and Object/Dictionary values.
Control flow
Conditions
Loops
Functions
Functions support parameters, local variables, return values and recursion in the current interpreter.
Modules
Current module imports expose the implemented standard-library APIs.
Standard library
| Module | Current focus |
|---|---|
| math | abs, sqrt, pow, floor, ceil, round, max, min, pi, e |
| string | length, upper, lower, trim, contains, startsWith, endsWith, replace |
| list | length, add, remove, contains, first, last |
| random | number, integer, choice |
| file | browser-safe read, write and download operations |
| time | date/time, formatting, date arithmetic and comparisons |
| system | OS, device, user, architecture, memory, online status and runtime controls |
Errors
The interpreter reports Daksh syntax and runtime errors such as undefined variables, division by zero, invalid indexes, invalid assignments and constant modification.