PRS Syntax — Guide & Examples

This page shows how to write PRS code with examples and explanations. Learn the syntax and structure for easy understanding.

PRS Syntax Introduction

The PRS language uses a specific format for command calls, including brackets and arguments.

CALL [function_name] [arg1] [arg2] ...

Brackets

In PRS, brackets [ ] are used to encapsulate function names and their arguments. For example:

CALL [print] [Hello, World!]

Each set of brackets corresponds to a parameter or a command keyword.

Arguments

Arguments passed to functions are placed within brackets as well. Nested arguments are also supported.

CALL [sum] [10] [20]

This calls the sum function with arguments 10 and 20.

Popup Example

Popups can be created using specific syntax with options:

CALL [popup] [title="Popup Title"] [content="Hello, this is a popup."] [buttons="OK,Cancel"]

Table Example

You can display data in table format using PRS syntax:

CALL [table] [
  ["Name", "Age", "City"],
  ["Alice", 30, "New York"],
  ["Bob", 25, "San Francisco"]
]
NameAgeCity
Alice30New York
Bob25San Francisco