Skip to content

Releases: Goofycat874/Easy-Language

2.0

Choose a tag to compare

@Goofycat874 Goofycat874 released this 02 Mar 15:12
eb31067

REVAP

1.1

1.1

Choose a tag to compare

@Goofycat874 Goofycat874 released this 01 Mar 17:09
6e11fc7

Added
trim
clearlist
firstitem
lastitem
input

Release 1.0

Choose a tag to compare

@Goofycat874 Goofycat874 released this 28 Feb 10:59
6e11fc7

Released 1.0
Text Functions:

upper text TEXT → Converts text to uppercase.
lower text TEXT → Converts text to lowercase.
concat text TEXT1, text TEXT2, ... → Concatenates multiple text values.
lengthof TEXT/VARIABLE → Returns the length of a text or variable.
substring TEXT start START length LENGTH → Extracts a substring from TEXT, starting at index START with length LENGTH.
replace TEXT old OLD new NEW → Replaces occurrences of OLD text with NEW text in TEXT.
split TEXT by SEPARATOR → Splits TEXT into a list of substrings using SEPARATOR as delimiter.
join list LIST by SEPARATOR → Joins elements of LIST into a single text, using SEPARATOR.
reverse text TEXT → Reverses the characters in TEXT.
Math Functions:

pow BASE, EXPONENT → Raises BASE to the power of EXPONENT.
sqrt NUMBER → Returns the square root of NUMBER.
ceil NUMBER → Returns the ceiling of NUMBER (rounds up to nearest integer).
floor NUMBER → Returns the floor of NUMBER (rounds down to nearest integer).
mod NUMBER1, NUMBER2 → Returns the modulo (remainder) of NUMBER1 divided by NUMBER2.
log NUMBER, BASE → Returns the logarithm of NUMBER to the given BASE.
sin NUMBER → Returns the sine of NUMBER (in radians).
cos NUMBER → Returns the cosine of NUMBER (in radians).
tan NUMBER → Returns the tangent of NUMBER (in radians).
Type Conversion Functions:

integer VALUE → Converts VALUE to an integer.
float VALUE → Converts VALUE to a floating-point number.
string VALUE → Converts VALUE to a string.
list VALUE → Converts VALUE to a list.
tuple VALUE → Converts VALUE to a tuple.
dictionary VALUE → Converts VALUE to a dictionary.
set VALUE → Converts VALUE to a set.
typeof VALUE → Returns the data type of VALUE as a string.
Aggregate Functions:

abs NUMBER → Returns the absolute value of NUMBER.
maxof VALUE1, VALUE2, ... → Returns the maximum value among VALUE1, VALUE2, etc.
minof VALUE1, VALUE2, ... → Returns the minimum value among VALUE1, VALUE2, etc.
round NUMBER → Rounds NUMBER to the nearest integer.
sumof LIST/ARRAY → Returns the sum of all elements in a LIST or ARRAY.
range START, END → Generates a list of integers from START to END (inclusive).
enumeratearray ARRAY → Returns a list of tuples, where each tuple contains the index and value from ARRAY.
helpfunction FUNCTION_NAME → Displays documentation/help for a given FUNCTION_NAME.
directoryof MODULE_NAME → Returns a list of names in the namespace of MODULE_NAME (like math, os, sys, etc.).
List/Array Functions:

append list/array LIST/ARRAY value VALUE → Appends VALUE to the end of LIST/ARRAY.
remove list/array LIST/ARRAY value VALUE → Removes the first occurrence of VALUE from LIST/ARRAY.
pop list/array LIST/ARRAY index INDEX → Removes and returns the element at INDEX from LIST/ARRAY.
indexof list/array LIST/ARRAY value VALUE → Returns the index of the first occurrence of VALUE in LIST/ARRAY.
countof list/array LIST/ARRAY value VALUE → Returns the number of times VALUE appears in LIST/ARRAY.
sortlist list/array LIST/ARRAY → Sorts the elements of LIST/ARRAY in place (ascending order).
uniquelist list/array LIST/ARRAY → Returns a new list containing only the unique elements from LIST/ARRAY (preserving order).
reverse list/array LIST/ARRAY → Returns a reversed copy of LIST/ARRAY.
Dictionary Functions:

createdictionary key KEY1 value VALUE1 key KEY2 value VALUE2 ... → Creates a dictionary from key-value pairs.
keysfromdictionary dictionary DICT → Returns a list of keys from DICT.
valuesfromdictionary dictionary DICT → Returns a list of values from DICT.
getvaluefromdictionary dictionary DICT key KEY → Returns the value associated with KEY in DICT.
setvalueindictionary dictionary DICT key KEY value VALUE → Sets or updates the value for KEY in DICT.
removekeyfromdictionary dictionary DICT key KEY → Removes the key-value pair with KEY from DICT.
Logical/Boolean Functions:

logicalnot BOOLEAN → Returns the logical NOT of BOOLEAN.
logicaland BOOLEAN1 BOOLEAN2 → Returns the logical AND of BOOLEAN1 and BOOLEAN2.
logicalor BOOLEAN1 BOOLEAN2 → Returns the logical OR of BOOLEAN1 and BOOLEAN2.
logicalxor BOOLEAN1 BOOLEAN2 → Returns the logical XOR of BOOLEAN1 and BOOLEAN2.
File Operations:

readfile file PATH → Reads the entire content of the file at PATH and returns it as text.
writefile file PATH text TEXT → Writes TEXT to the file at PATH, overwriting existing content.
appendfile file PATH text TEXT → Appends TEXT to the end of the file at PATH.
Screen and Program Control:

clearscreen → Clears the console screen.
exitprogram → Terminates the program execution immediately.
Date and Time Functions:

currenttime → Returns the current time in HH:MM:SS format.
currentdate → Returns the current date in YYYY-MM-DD format.
currenttimestamp → Returns the current timestamp (seconds since epoch) as a string.
Random Functions:

random number MIN to MAX → Generates a random integer between MIN and MAX (inclusive).
random text OPTION1, OPTION2, ... → Randomly chooses and returns one text option from the provided list.
random boolean → Returns a random boolean value (True or False).
Storage (Variable Declaration and Assignment):

storage number NAME = VALUE → Declares a variable NAME of type number (integer) and assigns it VALUE.
storage integer NAME = VALUE → Declares an integer variable NAME and assigns VALUE.
storage float NAME = VALUE → Declares a float variable NAME and assigns VALUE.
storage text NAME = text VALUE → Declares a text (string) variable NAME and assigns it the text literal VALUE.
storage boolean NAME = true/false → Declares a boolean variable NAME and assigns it true or false.
storage array NAME = createarray ELEMENT1 ELEMENT2 ... → Declares an array (list) variable NAME and initializes it with elements.
storage dictionary NAME = createdictionary key KEY1 value VALUE1 ... → Declares a dictionary variable NAME and initializes it with key-value pairs.
Control Flow Statements:

if CONDITION: ... end → Executes the code block between if and end only if CONDITION is true.
if CONDITION is true: ... end → Same as if CONDITION:. (More verbose form)
if CONDITION is false: ... end → Executes the code block if CONDITION is false.
while CONDITION do ... end → Repeatedly executes the code block as long as CONDITION remains true.
for START to END do ... end → Executes the code block for each integer from START to END (inclusive), with loop variable i.
Program Execution:

print VALUE/EXPRESSION → Prints the result of evaluating VALUE or EXPRESSION to the console.
end program → Terminates the DSL program.

Beta 1.0

Beta 1.0 Pre-release
Pre-release

Choose a tag to compare

@Goofycat874 Goofycat874 released this 27 Feb 14:57
3f34743

Built-in Functions

upper text TEXT → Converts text to uppercase.
lower text TEXT → Converts text to lowercase.
concat text TEXT1, text TEXT2, ... → Concatenates multiple text values.
pow BASE, EXPONENT → Raises a number to a power.
len TEXT/VARIABLE → Returns the length of a text.
type VALUE → Returns the type of a value.
int VALUE → Converts a value to an integer.
float VALUE → Converts a value to a float.
str VALUE → Converts a value to a string.
list VALUE → Converts a value to a list.
tuple VALUE → Converts a value to a tuple.
dict VALUE → Converts a value to a dictionary.
set VALUE → Converts a value to a set.
abs NUMBER → Returns the absolute value of a number.
max VALUE1, VALUE2, ... → Returns the maximum value from a list.
min VALUE1, VALUE2, ... → Returns the minimum value from a list.
round VALUE → Rounds a number.
sum LIST/ITERABLE → Returns the sum of all numbers in a list.
range START, STOP → Generates a range of numbers.
enumerate LIST/ITERABLE → Returns an enumerated object.
help FUNCTION → Displays help for a function.
dir OBJECT → Lists available attributes for an object.
Random Functions

random number MIN to MAX → Generates a random integer between MIN and MAX.
random text OPTION1, OPTION2, ... → Chooses a random text from given options.
random boolean → Returns a random boolean (True/False).
Storage (Variable Declaration and Assignment)

storage number NAME = VALUE → Stores an integer in a variable.
storage float NAME = VALUE → Stores a floating-point number.
storage text NAME = text VALUE → Stores a text (string).
storage boolean NAME = true/false → Stores a boolean value.
Control Flow Statements

if CONDITION is true: → Executes code block if the condition is true.
if CONDITION is false: → Executes code block if the condition is false.
while CONDITION do → Executes a loop while the condition is true.
for START to END do → Loops from START to END.
Program Execution

print VALUE/EXPRESSION → Prints a value or expression.
end program → Terminates the program execution.