
Page generated from: Examples_v4.4.md
See SET Files in action
This collection demonstrates SET Files features from simple Q-Set configurations to advanced X-Set usage.
---
These examples use the Q-Set baseline (.qset files) - simple, straightforward, and universally compatible.
---
Basic application configuration with key-value pairs:
myapp.qset
Application configuration
[DATABASE]
Host|localhost
Port|5432
Database|myapp
[SETTINGS]
Theme|dark
Language|en-US
MaxUsers|50
Features: Basic groups, key-value pairs, comments
---
Serial port and communication settings:
protocols.qset
Communication protocols
[RS232]
Port|COM1
Baud|9600
DataBits|8
StopBits|1
Parity|N
[MODBUS]
Protocol|RS232|9600|8|N|1|none
Timeout|1000
RetryCount|3
Features: Multiple groups, delimited arrays
---
Structured data with multiple records:
employees.qset
Employee database
[EMPLOYEES]
{id|first_name|last_name|department|hire_date|salary}
101|Alice|Smith|Engineering|2023-01-15|95000
102|Bob|Jones|Marketing|2023-02-20|75000
103|Carol|White|Engineering|2023-03-10|98000
104|David|Brown|Sales|2023-04-05|82000
[DEPARTMENTS]
{id|name|manager|budget}
1|Engineering|Alice Smith|500000
2|Marketing|Bob Jones|250000
3|Sales|David Brown|350000
Features: Field definitions, tabular data, multiple tables
---
Product catalog with detailed information:
inventory.qset
Product inventory
[PRODUCTS]
{sku|name|category|price|stock|reorder_level}
WID-001|Widget A|Widgets|10.00|150|50
WID-002|Widget B|Widgets|15.00|200|50
GAD-001|Gadget X|Gadgets|25.00|75|25
GAD-002|Gadget Y|Gadgets|30.00|100|25
[SUPPLIERS]
{id|name|contact|phone}
1|Acme Corp|John Smith|555-1234
2|Global Supplies|Jane Doe|555-5678
Features: Multiple data tables, numeric data, business records
---
Application information with multi-line text:
application.qset
Application metadata
[APP_INFO]
Name|My Application
Version|2.0.0
Description|[{APP_DESCRIPTION}]
License|[{LICENSE_TEXT}]
[{APP_DESCRIPTION}]
My Application is a comprehensive workflow management tool.
Features:
- Task tracking and assignment
- Team collaboration
- Real-time synchronization
- Customizable workflows
Perfect for teams of any size!
[{LICENSE_TEXT}]
MIT License
Copyright (c) 2025 Your Name
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...
Features: Text groups, text group references, multi-line content with no escaping
---
Menu structures and hierarchical data:
menu.qset
Application menu structure
[MAIN_MENU]
{id|label|items}
1|File|New!Open!Save!Save As!Exit
2|Edit|Undo!Redo!Cut!Copy!Paste!Preferences
3|View|Zoom In!Zoom Out!Full Screen!Toggle Sidebar
4|Help|Documentation!About!Check for Updates
[TOOLBAR]
{id|group|buttons}
1|Standard|New!Open!Save!Print
2|Format|Bold!Italic!Underline!Font Color
3|Navigation|Back!Forward!Home!Refresh
Features: Secondary delimiter (!), nested arrays, hierarchical data
---
Content in multiple languages:
i18n.qset
Internationalization strings
[APP_INFO_EN]
AppName|Global Connect
Tagline|Connect with the world
WelcomeMessage|[{WELCOME_EN}]
[APP_INFO_ES]
AppName|Conexión Global
Tagline|Conecta con el mundo
WelcomeMessage|[{WELCOME_ES}]
[APP_INFO_FR]
AppName|Connexion Mondiale
Tagline|Connectez-vous au monde
WelcomeMessage|[{WELCOME_FR}]
[{WELCOME_EN}]
Welcome to Global Connect!
Start connecting with people around the world.
[{WELCOME_ES}]
¡Bienvenido a Conexión Global!
Comienza a conectarte con personas de todo el mundo.
[{WELCOME_FR}]
Bienvenue sur Connexion Mondiale !
Commencez à vous connecter avec des gens du monde entier.
Features: Multiple language groups, text group localization
---
Multiple environment configurations in one file:
env_config.qset
Multi-environment configuration
[DATABASE_PRODUCTION]
Host|prod-db-01.example.com
Port|5432
Database|myapp_prod
PoolSize|50
SSL|true
[DATABASE_STAGING]
Host|staging-db.example.com
Port|5432
Database|myapp_staging
PoolSize|20
SSL|true
[DATABASE_DEVELOPMENT]
Host|localhost
Port|5432
Database|myapp_dev
PoolSize|5
SSL|false
[CACHE_PRODUCTION]
Provider|redis
Host|prod-cache-01.example.com
Port|6379
TTL|3600
[CACHE_DEVELOPMENT]
Provider|memory
TTL|300
Features: Environment-based groups, structured naming conventions
---
These examples use X-Set extensions (.xset files) for advanced features beyond the Q-Set baseline.
---
When your data contains pipes, use semicolons instead:
data.xset
[THIS-FILE]
X-SET|delimiters:1.0
[DELIMITERS]
Primary|;
[CONFIG]
Name;MyApp
Path;C:\Program Files\MyApp
Expression;value > 10 | value < 5
LogFormat;[timestamp] | [level] | [message]
[EXPRESSIONS]
{id;pattern;description}
1;result >= 100 | error;Check for overflow or error
2;status == OK | WARN;Acceptable states
Features: Custom delimiter (;), pipes in data are literal
---
Combine multiple files into one logical configuration:
main.xset
[THIS-FILE]
X-SET|includes:1.0
[APP]
Name|MyApp
Version|2.0.0
Include|database.set
Include|cache.set
Include|logging.set
---
database.set
Database configuration shared across apps
[DATABASE]
Host|db.example.com
Port|5432
User|app_user
Database|shared_db
---
cache.set
Redis cache configuration
[CACHE]
Host|redis.example.com
Port|6379
TTL|3600
---
logging.set
Logging configuration
[LOGGING]
Level|INFO
Output|file
Path|/var/log/myapp
MaxSize|100MB
Features: File includes, modular configuration, shared settings
---
Type-safe data with validation:
users.xset
[THIS-FILE]
X-SET|schemas:0.9
[USERS]
{id:int|username:string|email:email|active:bool|created:date}
1|alice|alice@example.com|true|2025-01-15
2|bob|bob@example.com|false|2025-01-18
3|carol|carol@example.com|true|2025-01-20
[PRODUCTS]
{id:int|name:string|price:float|stock:int|category:enum(electronics,furniture,clothing)}
1|Laptop|999.99|15|electronics
2|Desk|299.50|8|furniture
3|T-Shirt|19.99|50|clothing
Features: Type hints, validation, enum types, type coercion
---
Different settings for different platforms:
build.xset
[THIS-FILE]
X-SET|conditionals:0.9
Platform|linux
[BUILD-linux]
Compiler|gcc
Flags|-O2 -Wall
Output|bin/app
LibPath|/usr/lib
[BUILD-windows]
Compiler|cl.exe
Flags|/O2 /W4
Output|bin\app.exe
LibPath|C:\Windows\System32
[BUILD-macos]
Compiler|clang
Flags|-O2 -Wall -framework Cocoa
Output|bin/app.app
LibPath|/usr/local/lib
Features: Platform conditions, automatic section selection
---
Dynamic values with macros:
config.xset
[THIS-FILE]
X-SET|macros:0.9
[ENVIRONMENTS]
dev|http://localhost:3000
staging|https://staging.example.com
prod|https://example.com
[PATHS]
base|/var/lib/myapp
data|{PATHS.base}/data
logs|{PATHS.base}/logs
cache|{PATHS.base}/cache
[CURRENT]
Environment|prod
[API]
BaseURL|{ENVIRONMENTS.{CURRENT.Environment}}
DataPath|{PATHS.data}
LogPath|{PATHS.logs}
Features: Variable references, nested expansion, dynamic configuration
---
All examples available on GitHub:
---Starting with Q-Set:
[THIS-FILE] groupX-SET line---
Q-Set patterns demonstrated:
These examples use SET Files v4.4:
[THIS-FILE] group with X-SET declarationdelimiters:1.0, schemas:0.9)---