-
-
Notifications
You must be signed in to change notification settings - Fork 0
Define Python Variables Inside Easy
Mohamed Dief edited this page Feb 16, 2021
·
1 revision
- 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 LikeuserInput
To TheSTORE
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 besomething
. Andhere
Will Behere
-
It's The Same For
VAR
Key. But InVAR
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 LikeSTORE
. Here's an Example
VAR something,here,"text"
- This Code Will Set Both Variables
something
andhere
To a String Calledtext
. The Last Variable Is Always The One Getting Added Into The First Variables.