Practical, working examples of DWScript in action, organized by category.
Arbitrary-precision math and number theory
Custom Class Operators Demo
Design by Contract Demo
Enumerations - named constants
Interfaces and Polymorphism Demo
Example of Json Demo
Lambdas and Functional Patterns
treating classes as first-class values
Inheritance and Polymorphism
Records in DWScript support default values and anonymous syntax
RTTI and Custom Attributes Demo
Inspecting types at runtime via Attributes
String pattern matching.
Converting integers to Roman Numerals.
Common string manipulation tasks
Basic Vigenere Cipher implementation.
Managing a dynamic task list
Advanced functional operations on arrays
Multi-dimensional dynamic arrays (Matrix)
Array slicing and ranges
Sorting and reversing arrays
Using arrays as Stacks (LIFO) and Queues (FIFO)
Comprehensive statistics on an array of Floats
Basic associative array usage
Using non-string keys in associative arrays
Storing records in associative arrays
Frequency counting using associative arrays
Grouping data using associative arrays of arrays
Iterating over associative arrays
Dynamic array operations with loops.
Arbitrary precision integers
Arbitrary-precision math and number theory
Simple FFT Magnitude calculation.
Generating numbers using recursion and memoization.
Haversine formula to calculate the great-circle distance between two points
Matrix multiplication using 1D array.
Finding roots of f(x) = x^3 - 3x^2 + 2x using Secant method.
The Sieve of Eratosthenes efficiently find all prime numbers up to a given limit.
Simple algorithm to find the prime factors of a given integer.
Classic recursive puzzle solution.
The Levenshtein distance is a string metric for measuring the difference
Recursive Backtracking Maze Generator
Implementation of Bubble Sort and Quick Sort.
Binary data manipulation
Example of Json Demo
SQLite Database Example
SQLite Bulk Insert via JSON
SQLite DataSet Navigation
SQLite JSON Export Demo
SQLite Transactions Demo
Example of Etag Demo
Example of Headers Cookies
This example demonstrates how to implement a simple rate limiter
Example of Redirect Demo
Example of Response Basic
Example of Server Info
Example of Sse Demo
Mandelbrot Set - ASCII Rendering
TPixmap image formats (PNG & JPEG)
This example demonstrates 3D Vector mathematics using the built-in TVector type.