Counter and Theme Toggle - Rebol Typing CST Test
Loading…
Counter and Theme Toggle — Rebol Code
Demonstrates a simple counter with theme toggling using Rebol variables and functions.
count: 0
isDark: false
updateUI: func [] [
print join "Counter: " count
print join "Theme: " (either isDark ["Dark"] ["Light"])
]
increment: func [] [
count: count + 1
updateUI
]
decrement: func [] [
count: count - 1
updateUI
]
reset: func [] [
count: 0
updateUI
]
toggleTheme: func [] [
isDark: not isDark
updateUI
]
; Simulate actions
updateUI()
increment()
increment()
toggleTheme()
decrement()
reset()Rebol Language Guide
REBOL (Relative Expression-Based Object Language) is a lightweight, cross-platform programming language designed for network communications, data exchange, and scripting. It emphasizes simplicity, human-readable syntax, and rapid development of distributed applications.
Primary Use Cases
- ▸Network protocols and communication
- ▸Scripting and automation
- ▸Rapid prototyping of applications
- ▸Data exchange with custom dialects
- ▸Embedded or lightweight distributed applications
Notable Features
- ▸Lightweight and portable across platforms
- ▸Human-readable, minimalistic syntax
- ▸Support for DSLs (domain-specific languages) via dialects
- ▸Built-in networking, GUI, and file-handling capabilities
- ▸Dynamic typing with flexible data structures
Origin & Creator
Developed in 1997 by Carl Sassenrath, creator of the AmigaOS multitasking kernel.
Industrial Note
REBOL is particularly valued in environments where compact, portable scripts for networking, automation, or embedded systems are required.