PLP language command

Projectly Programming Language

Created with Sketch.

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 <write("")> for print a text used , and <clears> for text clear used. <milisleep(100)> in linux used and set with 100 milliseconds.
do i can in seconds and or minutes i pause?

Yes, enough command <sleep> and or <minusleep> write.

/* 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. (OpenGL)

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 <ring> command to write a condition.

ring in PLP means the same <if> you can use if too , for example:

#include "import"
_ /* Define integer with (in) */
in i = 3;
/* integer in ring */
ring i == 3)
print "Hello World";
End
  • You can also use <backring> as <else> in C language, for example:
#include "import"
_ in i = 3;
ring i == 3)
print "Hello World";
backring
print "failed";
End
  • Use <ringf> and <ringw> to write duplicate circles. these two loops in C <for> and <while>, 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

Github: https://github.com/PLPLanguage/PLPv1b

Telegram:Telegram.me/PLPlanguage

Instagram:https://instagram.com/plplanguage

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.