All Downloads are FREE. Search and download functionalities are using the official Maven repository.

reference.language.add.html Maven / Gradle / Ivy




    
    Add expressions
    
    

    
    

    
    

    
    
    
    

    


Add expressions

Add expressions are used to add 2 values.
An add expression is a code fragment which produces a value, whose type is determined by the values being added, and which can then be used as an input for other operations: print, write, method call and so forth.
An add expression has the form a + b.

Add expressions are sometimes commutative, but not always. Adding numbers is commutative, but adding Texts is not.
However, to help in programming, Prompto supports implicit commutation, where if a + b does not make sense, it will treat it as b + a
.

Adding Text or Character values and other values

Adding a Text or Character value a and any other value b is legal if b has a textual representation.
It returns a Text value, concatenating a and b.

Adding Integer and Decimal values

Adding Integer and Decimal values returns an Integer value if both values are Integer, and a Decimal otherwise.

Adding Date and Period values

Adding Date and Period values returns a Date value, the Time section of the Period value is ignored.

Adding Time and Period values

Adding Time and Period values returns a Time value, the Date section of the Period value is ignored.

Adding DateTime and Period values

Adding DateTime and Period values returns a DateTime value.

Adding Period and Period values

Adding Period and Period values returns a Period value.

Adding List and List or Set values

Adding List and List or Set values is legal if both collections have the same item type. It returns a List value.

Adding Set and List or Set values

Adding Set and List or Set values is legal if both collections have the same item type. It returns a Set value.

Adding Tuple and Tuple, List or Set values

Adding Tuple and Tuple, List or Set values returns a Tuple value.

Adding Dictionary and Dictionary values

Adding Dictionary and Dictionary values is legal if both collections have the same item type. It returns a Dictionary value.
The items in the right-hand value supersede the items in the left-hand value if they have the same key.

Adding user defined values

Prompto supports adding user defined values. See categories for details.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy