This repository has been archived by the owner on Sep 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Basics
Satakun Utama edited this page May 20, 2021
·
6 revisions
This Wiki page will guide you through the basics of StoryScript.
In StoryScript, Currently, there are 8 types of data. (On a Python Interpreter)
- Boolean (True, False value)
- Integer (Full number value)
- Float (Non-full number, Like 3.14)
- List
- Dictionary (A List of "Key:Value" pair of data)
- Tuple (An Unmodifiable version of List)
- Dynamic (A Type that can be any type)
- String (a Message)
This will list all the Abbreviations used to Declaring a Variable for each keyword.
- Boolean | bool
- Integer | int
- Float | float
- List | list
- Dictionary | dictionary
- Tuple | tuple
- Dynamic | dynamic
- String | string
To declare a variable, You do it like this:
type name = value
You can't use a variable name starting with numbers. like 1122uwu
For example, If you wanted to declare an Integer, You could do:
int owo = 5
Or use the var
keyword. This will detect the type.
And you can't assign 3.14 to Integer. Or else It will throw an Error.
To delete a variable you use del
keyword.
var a = 10
del a
Use typeof function to check the type of the Variable or Data.
var a = 10
typeof (a)
Output:
Types.Integer
Another example:
typeof ("owo")
Output:
Types.String