Examples of GRP language
Test applications for Grapnel compiler
Example of three processes
Application t2
contains three processes. The first process (t2p2) sends data
to each other. It sends a double type data to t2p3 with value
1.1. After that it modifies data value to
2.2 and sends it to t2p3. The second process
(t2p3 - as you see it numbered 3) receives data
(2.2) from t2p1 process and multiplies it with
2.3 and sends the result of the multiplication
(5.06) to the t2p2 process. The last process
(t2p2) does nothing else that receives data from t2p1
and t2p3 processes and prints data values on the consol. It
means than it calls a special GRP
function that sends data to server program and server prints it on
the screen. The processes are not able to print any data on the screen
directly. They have to send their print requests to server program.
Test of nested program blocks
Test of the ALT constructionGraphical representation of the program:
Back to
Grapnel Compiler.