RTR
RTR is a lightweight, event-driven scripting language designed for simplicity and flexibility. This documentation provides comprehensive information about the RTR language, its features, and how to use it effectively.
Documentation Sections
Basics - Learn the fundamental concepts and syntax of RTR
Structure - Understand the core components and structure of RTR code
Functions - Detailed documentation of all built-in functions
What is RTR?
RTR is a scripting language that provides:
Event-driven programming model
Simple and intuitive syntax
Built-in functions for common operations
Object-oriented capabilities
Dynamic typing
Error handling
Modular and extensible design
Key Features
Event System: Organize code around events
Variables: Dynamic typing with support for various data types
Functions: Define and call functions with parameters
Objects: Create and manipulate objects with methods
Control Flow: If statements, loops, and more
Built-in Functions: Mathematical, string, array, and object operations
Error Handling: Basic error handling through events
Comments: Multiline comments using
/* */
syntaxWhitespace: Newlines have no syntactic meaning
Example
Here's a simple example of RTR code:
event (onload) {
/* Create a person object */
person = obj();
person.name = "John";
person.age = 30;
/* Define a greeting method */
person.greet = (name)~{
return(join("Hello, ", name, "! I am ", this.name));
}
/* Use the method */
message = person.greet("Alice");
log(message); /* Outputs: Hello, Alice! I am John */
}
Getting Started
To start using RTR:
Read the Basics guide to learn the fundamental concepts
Explore the Structure documentation to understand how RTR code is organized
Check out the Functions documentation to learn about available built-in functions
Try writing your own RTR code using the examples provided
Use the built-in functions and features to build your applications
Resources
GitHub Repository - Source code and additional resources
Examples - Code examples and use cases
Best Practices - Guidelines for writing effective RTR code
Last updated