Skip to content

Variables

Liam Riddell edited this page Apr 29, 2024 · 2 revisions

User Guide: Declaring and Reusing Variables

In Obsidian Solve, you have the power to declare variables and reuse them, thanks to the versatile = operator. This feature allows you to streamline your calculations and enhance the efficiency of your note-taking process.

However, it's important to be aware of some guidelines and considerations when working with variables:

  • Variable Naming Rules: Variable names should not contain whitespace or special characters, and they must not start with a number. This ensures consistent and error-free usage.

  • Reserved Characters and Keywords: Keep in mind that certain characters and keywords cannot be used as variable names. For instance, "K" might represent a temperature unit in Kelvin.

Here's an example to illustrate variable usage:

:x = 100
:y = 20
:x * :y

In this example, :x is assigned the value of 100, and :y is assigned the value of 20. The equation :x * :y results in 2000.

Warning: Variables can only be used on the screen where they are declared, and their scope is limited to that context. This design approach is intentional to optimize performance and prevent potential issues in larger documents.

Keep these guidelines in mind as you harness the power of variables in Obsidian Solve. Please note that following these practices will help you achieve optimal results and avoid potential conflicts.

Clone this wiki locally