Developing Apama Applications > Apama EPL Reference > Variables > Variable declarations > Primitive-type initializers
Primitive-type initializers
Variable of the primitive types can be given an initial or starting value by including an Initializer after the variable name.
Initializer
Rule components
The expression result type in an Initializer must be of the same type as the variable being initialized. The expression’s result value is used as the variable’s initial or starting value.
Examples
boolean a := true;
boolean b := false;
boolean c := true, d := false;
integer i := 42;
float f := 100.6180339887;
string s1 := "abcdefghijklmnopqrstuvwxyz";
string s2 := s1;
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.