Apama Documentation : Developing Apama Applications : Developing Apama Applications in EPL : Defining What Happens When Matching Events Are Found : Assigning values
Assigning values
Valid examples of an assignment statement are:
integerVariable := 5;
floatVariable := 6.0;
stringVariable := "ACME";
stringVariable2 := stringVariable;
Assignments are only valid if the type of the literal or variable on the right hand side corresponds to the type of the variable on the left hand side.
When doing an assignment from a variable to another variable the behavior of EPL depends on the type of the variable.
*In the case of primitive types the variable on the left hand side is set to the same value as the variable on the right hand side. The value is therefore copied and the two variables remain distinct.
*In the case of complex reference types the variable on the left hand side is set to reference the same object as the variable on the right hand side. Only the reference is copied, while the underlying object remains the same. If the object is subsequently changed, both variables would reflect the change.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback