A++ Programming Language is a project that allows you to write and run A++.
| Operator | Description |
|---|---|
+ |
Addition |
++ |
Increment |
+= |
Add and assign |
- |
Subtraction |
-- |
Decrement |
-= |
Subtract and assign |
* |
Multiplication |
** |
Power |
*= |
Multiply and assign |
/ |
Division |
/= |
Divide and assign |
% |
Modulo |
= |
Assignment |
== |
Equality comparison |
!= |
Inequality comparison |
< |
Less than |
<= |
Less than or equal |
> |
Greater than |
>= |
Greater than or equal |
&& |
Logical AND |
|| |
Logical OR |
! |
Logical NOT |
| Keyword | Description |
|---|---|
var |
Declare a variable |
const |
Declare a constant |
func |
Define a function |
class |
Define a class |
if |
Conditional statement |
else |
Alternative branch |
for |
Loop with counter |
while |
Loop with condition |
return |
Return a value |
break |
Exit a loop |
continue |
Skip iteration |
pass |
No operation |
In A++, variables are declared using var and can be modified, whereas constants are declared using const and cannot be reassigned after initialization.
var variableName: Type = value;
const constantName: Type = value; var age: Integer = 30; // Integer variable
const pi: Float = 3.14159; // Floating-point constant
var isActive: Boolean = true; // Boolean variable
const greeting: String = "Hello World"; // String constant
// Type inference example
var score = 100; // Integer inferred from value
const message = "Hello World"; // String inferred from value
// Declaration without initialization
var counter: Integer; // Must be initialized before use- Constants must be initialized when they are declared.
- If the type is omitted, A++ attempts to infer it from the initial value.
- Variables can be declared without initialization but using them before they are assigned a value will result in an error.
| Type | Example | Description |
|---|---|---|
Boolean |
true, false |
Boolean values |
Integer |
10, 2 |
Whole numbers |
Float |
3.14 |
Decimal numbers |
String |
"Hello", 'Word' |
Text values |
// Single-line comment /*
Multi-line
comment
*/To install the project, run the following command
git clone https://github.com/arthur10o/app_programming_language.git
cd app_programming_language
npm installTo start the application, run the following command
npm startTo build the application (WASM + assets), run the following command
npm run buildSee the project tasks here:
See the license here: