Here is an exercise in starting a new process and executing its code from a single project method:
If (Count parameters=0)
$proc:=New process(Current method name;1024*32;Current method name;True)
`rest of method here - will run in the new process
Why would you want to do this?
For example if you don't have a process handler, you may be calling a new process in code in another project method, which convolutes the program flow. This solution helps to minimize project methods, and keeps the design organization and debugging cleaner since you can see what code the new process will run, and can easily trace it with bullet points.
It can also be handy if you just want to test something that takes place in a new process with a specified amount of memory so that you don't have to generate two project methods for the test.
The idea is similar to a project method that is called to do a number of different tasks based on a case statement such as: