Rotur
  • Getting Started
  • Your Connection
    • What is a websocket?
    • Connecting
      • Handshake
      • SetID
      • Link
    • Authentication
      • Get User Data
      • Login
    • Rotur Designations
    • Websocket Commands
      • Global Message (gmsg)
      • Private Message (pmsg)
      • Login to rotur (auth)
  • My Account
    • Rotur Account Objects
      • originOS specific keys
    • Requesting my ofsf storage
    • Rotur Badges
    • Transactions and Taxes
  • Assorted APIs
    • rMail
    • avatars.rotur.dev
      • .banners
    • rotur.dev/auth
    • Keys
  • languages
    • RWL
      • Basics
      • Structure
      • Attributes
        • Text
        • Frame
        • Section
      • Alignments and Anchors
    • RTR
      • Basics
      • Structure
      • Functions
        • Mathematical Functions
        • String Functions
        • Array Functions
        • Object Functions
        • Logical Functions
        • Utility Functions
      • Events
      • Examples
    • RDF
  • Claw
    • What is claw
    • Api Endpoints
      • /feed
      • /post
      • /follow
      • /unfollow
      • /followers
      • /following
      • /profile
      • /delete
      • /rate
      • /following_feed
      • /reply
      • /repost
      • /top_posts
      • /search_posts
      • /search_users
  • Web Standard
    • What is this
  • Addons / Extensions
    • Basic Structure
    • Events
      • onload
      • page_load
      • page_focus
    • API
      • Classes
        • Page
          • (static) .new()
          • .getTitle()
        • URL
          • (static) .new()
          • (static) .parse()
          • .format()
          • .getAsyncData()
          • .getFetchUrl()
          • .getTitle()
    • Commands
      • redirect
      • opentab
    • Variables
      • tab_info
      • page_width / height
      • scroll_x / y
Powered by GitBook
On this page
  • Documentation Sections
  • What is RTR?
  • Key Features
  • Example
  • Getting Started
  • Resources
Edit on GitHub
  1. languages

RTR

PreviousAlignments and AnchorsNextBasics

Last updated 25 days ago

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

  1. - Learn the fundamental concepts and syntax of RTR

  2. - Understand the core components and structure of RTR code

  3. - 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 /* */ syntax

  • Whitespace: 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:

  1. Try writing your own RTR code using the examples provided

  2. Use the built-in functions and features to build your applications

Resources

Read the guide to learn the fundamental concepts

Explore the documentation to understand how RTR code is organized

Check out the documentation to learn about available built-in functions

- Source code and additional resources

- Code examples and use cases

- Guidelines for writing effective RTR code

Basics
Structure
Functions
Basics
Structure
Functions
GitHub Repository
Examples
Best Practices