P Sharp is my stab at creating a programming language that combines my favorite elements from different languages. Key points include...
import packageName as name** = Exponent
% = Modulus
// = Integer Division
/ = Division
* = Multiplication
- = Subtraction
+ = Additiontrue
false== = Equal to
!= = Not equal to
< = Less than
> = Greater than
<= = Less than or Equal to
>= = Greater than or Equal to
is = return true if a is b
is not = return true if a is not bname string = 'andrew';functionName returnType(parameter1 string) {
print('Hello world!');
}// For loops
for variable in condition {
if (condition == true) {
keep doing thing
}
else {
break
}
}
// While loops
while condition {
if (condition == true) {
keep doing thing
}
else {
break
}
}// Declaring a new array!!!
names List<string> = ['Andrew', 'James'];numbers Tuple(int, int) = (1, 4);// this is a comment homieprint('thing');age string = '100';
// cast string age to an int
int(age);