Skip to content

Define Python Variables Inside Easy

Mohamed Dief edited this page Feb 16, 2021 · 1 revision

Defining Python Variables Inside Easy

  • In Easy, You Can Define Local Python Variables Using Two Keys. The First One STORE Is Used To Store Functions Outputs. For Example, In Python When You Want To Take a User Input. You Use This Simple Code.
userInput = input("What's your input?")
  • In Easy, It's Something Similar. STORE Does Create a Variable With The Argument Getting Passed Into It. So If Your Code Is Passing Something Like userInput To The STORE Key. It Will Use as The Variable Name. Here's an Example:
STORE userInput
CALL input,"What's your input?"
  • In Case You Want To Assign More Than One Variable Into The Function Call. STORE Does Support Multiple Variables Assignment In Functions That Does Return More Than One Variable. So If We Have This Function In Python.
def someFunction():
    return "something","here"
  • We Can Use This Easy Code To Store Both Values Getting Returned From This Function. Here's an Example:
STORE var,here
CALL someFunction
  • The Variable var Will be something. And here Will Be here

  • It's The Same For VAR Key. But In VAR It Doesn't Wait For a Function Call Next To It. VAR is Used To Assign Local Static Variables. And It Does Support Multiple Variables Like STORE. Here's an Example

VAR something,here,"text"
  • This Code Will Set Both Variables something and here To a String Called text. The Last Variable Is Always The One Getting Added Into The First Variables.
Clone this wiki locally