Programming++ is a cross-platform, object-oriented scripting language. It
is a small and lightweight language. Inside a host environment (for
example, a desktop application), Programming++ can be connected to the console application
to provide programmatic control over them.
Programming++ is a general-purpose programming language
created by Abir Abedin Khan as an extension of the
Programming++ is (.progpp). The language has expanded
significantly over time. This language is developed in python.
What you should already know
This guide assumes you have the following basic background:
-
A general understanding of Programming Language.
- Good working knowledge in computer.
You use variables as symbolic names for values in your application. The
names of variables, called identifiers, conform to certain rules.
To Indicate a variable in programming++ you need to write first capital
VAR then your var name and = your variable.
Example-
VAR a = 1525
VAR b = 2558
PRINT(a+b)
Use the if statement to execute a statement if a logical condition is
true. Use the optional else clause to execute a statement if the condition
is false. An if statement looks as follows:
IF </expr> THEN
<expr>
<expr>
<expr>
<expr>
<expr>
ELSE
<expr>
<expr>
<expr>
<expr>
<expr>
END
#######OR#######
IF <codition> THEN <expression> ElSE <expression>
condition can be any expression that evaluates to true or false. See
Boolean for an explanation of what evaluates to true and false. If
condition evaluates to true, statement_1 is executed; otherwise,
statement_2 is executed. statement_1 and statement_2 can be any statement,
including further nested if statements.
You may also compound the statements using else if to have multiple
conditions tested in sequence, as follows:
IF <expr> THEN
<expr>
<expr>
<expr>
<expr>
<expr>
ELIF <expr> THEN
<expr>
<expr>
<expr>
<expr>
<expr>
END
#######OR#######
IF <codition> THEN <expression> ElIF <codition> THEN <expression>
In the case of multiple conditions only the first logical condition which
evaluates to true will be executed. In general, it's good practice
to always use block statements, especially when nesting if statements:
IF </expr> THEN
<expr>
<expr>
<expr>
<expr>
<expr>
ELSE
<expr>
<expr>
<expr>
<expr>
<expr>
END
#######OR#######
IF <codition> THEN <expression> ElSE <expression>
A while statement executes its statements as long as a specified condition
evaluates to true. A while statement looks as follows:
WHILE <codition> THEN <expr>
#######OR#######
WHILE <codition> THEN
<expr>
<expr>
<expr>
<expr>
<expr>
END
If the condition becomes false,
statement within the loop stops executing and control passes to the
statement following the loop.
The condition test occurs before statement in the loop is executed. If
the condition returns true, statement is executed and the condition is
tested again. If the condition returns false, execution stops and
control is passed to the statement following while.
A function definition (also called a function declaration, or function
statement) consists of the function keyword, followed by:
- FUN <Name>()
-
Now write your expression
-
Now end your function with END
For example, the following code defines a simple function named square:
FUN <name>() -> <expr>
FUN <name>()
<expr>
<expr>
<expr>
<expr>
<expr>
END