Hi,

I'm looking through the provided Osiris script "_Greevers_Little_Helpers" at the moment, and am wondering about how procs are executed by Osiris.

If you take a mainstream programming language that features function overloading then the function that is executed is usually choosen by the type of the argument.

Now looking at this snippet from Osiris:

Code
PROC
Proc_CountHelper((STRING)_ID)
AND
NOT DB_CountHelper(_ID,_)
THEN
DB_CountHelper(_ID,0);

PROC
Proc_CountHelper((STRING)_ID)
AND
DB_CountHelper(_ID,_OldValue)
AND
IntegerSum(_OldValue,1,_Value)
THEN
NOT DB_CountHelper(_ID,_OldValue);
DB_CountHelper(_ID,_Value);


Both procs are named exactly the same and both take only a single parameter which has the same type and name. The first creates the database if it not exists, the second increments the counter.

In the mainstream languages that I know this would not work as it's not clear how to pick which proc to execute. Which is why I wonder which of the two procs get's executed. I'm assuming both execute and the conditions are the only thing deciding which is executed fully until the end?