Skip to content

Latest commit

 

History

History
73 lines (42 loc) · 1.73 KB

basics.md

File metadata and controls

73 lines (42 loc) · 1.73 KB

😁 Basics

Of course, every language starts with the basics.

The first thing you have to do is create a new project, to do so:

Creating your first project.

1- Make a folder anywhere after installing dotlang

2- Open the terminal in that folder you have created

3- type in: dot new and output should be:

image

4- now open main.dot in any of your favourite code editors (e.g. VS Code, Notepad++, etc.)

5- you're gonna see the first line Import-Module .\dot.ps1, do NOT touch it, this will import dotlang.

6- you're now ready to learn the basics!!

Basic Commands

...

Print Text

To print a text on the screen simply,

printTxt("Hi I'm dotlang!"); # semicolons are optional.

Print Warning

To print a warning text (yellow and followed by the word WARNING:) simply,

printWarning("This is a test!"); # Output: WARNING: This is a test!

Print Errors,

ever thought of showing an error to the user? well you can! simply,

printError("This is just a test!");

Output: image

Print Colored Text

yeah! text with your own custom color! simply,

printColored "I'm green!" "Green";

Output: image

Print Progress

your code takes time to execute? no worries just simply use,

printProgress "Activity" "Status";

Output: image

That's it for basic commands!