PCL is a programming language to calculate physical calculations. PCL stands for Physics Calculation Language. I have got the idea for the language once in physics class, where I was bored of calculating all these forces and stuff, so I thought, that I could just write a program, that could do that for me. I then started to develop the idea with S1 and this is the result. S1 helped me with the Alpha version, so half the credit goes to him. The Beta version of the language was written in C++ by DataShibe. The version you are currently looking at is the slim verison of the language, so if you want more features go check out PCL2.
PCL is a very basic language in the form of a declarative language but there isn't a real flow-structure in the language.
Here is the Wiki article of declarative programming languages: https://en.wikipedia.org/wiki/Declarative_programming
PCL can define variables and do calculations with them. You can also declare different ratios of types, for example the type 'g' is calculated by multiplying 'm' with 'f'. You can then calculate variables with these ratios and print them out. Overriding variables and setting them to other ones is also included.
If you want to know more about the syntax of the language, take a look at the grammar file and the example.
g G = 9.81
m Mass = 100
calc f : g / m
f Force : G, Mass
final Force
This program will multiply G
with Mass
and print the result.
- Download PCL.exe
- Create a file
- run
PCL {filename}