Skip to content

DataShibe/PCL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PCL Icon

PCL

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.

Technical Information

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

What can the language do?

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.

Sample Code

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.

How to run PCL

  1. Download PCL.exe
  2. Create a file
  3. run PCL {filename}

Links

S1mons Profile

About

Physics Calculation Language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published