What is the structure of PLP language ?
- In general, the PLP language structure is based on C and C++ and can be written as follows:
_ {Here This Code}
End
How to write Hello World in PLP ?
- To write Hello World in PLP you can use print command for example:
#include "import"
_ print "Hello World";
End
- You can for go to next line write this command:
/* this code for windows and Unix(and MacOS) and linux */
#include "import"
_ print "Hello";
println "World";
End
- this code
for print a text used , and for text clear used. in linux used and set with 100 milliseconds.
do i can in seconds and or minutes i pause?
Yes, enough command
/* this code for Unix(and MacOS) and linux */
#include "import"
_ write("Hello");
clears
milisleep(500);
write("Hello Write");
End
- Use the cls command to clear in Windows:
#include "import"
_ print "Hello";
cls
print "Welcome to PLP";
End
Animation in PLP
- The animation in PLP is done with the Animation() command
Of course, this command is only for text and characters, and will soon be used for graphics as well. (TK/tcl)
For Example:
/* this code for Windows and Unix(and MacOS) and Linux */
#include "import"
_ Animation("H",500);
Animation("He",500);
Animation("Hel",500);
Animation("Hell",500);
Animation("Hello",500);
End
How to make iterative loops and conditional structure in PLP?
- You can use the
command to write a condition.
ring in PLP means the same
#include "import"
_ /* Define integer with (in) */
in i = 3;
/* integer in ring */
ring i == 3)
print "Hello World";
End
- You can also use
as in C language, for example:
#include "import"
_ in i = 3;
ring i == 3)
print "Hello World";
backring
print "failed";
End
- Use
and to write duplicate circles. these two loops in C and , respectively.
for example:
#include "import"
_ ringw true){
/* Define a string variable */
text s;
print "Write something:";
/* Get character with send */
send s;
ringf in i = 0;i <= 10;i++){
print i;
}
ring s == "char"){
/* Define character variables with $ */
ringf $ a = 'a';a <= 'z';a++){
print a;
}
}
}
End
Examples of PLP codes and commands
- Beginner PLP language developers can use Example::{Here code} code to make the code easier to understand.
for example:
#include "import"
_ Example::OS();
End
Github: https://github.com/PLPLanguage/PLPv1b
Telegram:Telegram.me/PLPlanguage
Instagram:https://instagram.com/plplanguage