Gambas/Combination

From Wikibooks, open books for an open world
< Gambas
Jump to: navigation, search

[edit] Combination Assignment Operators

Gambas supports combination assignment operators (also called compound assignment operators ) in a similar manner to the C programming language. The combination assignment operators provide a more concise way of creating expressions by enabling calculations involving a variable to be performed without the variable being included in the right hand operand.

value += 3 ' value = value + 3 value /= 3 ' value = value / 3 value *= 3 ' value = value * 3

[edit] Arithmetic

+= addition -= subtraction

  • = multiplication

/= division

[edit] Concatenation

| &= | Concatenation | &\= | Concatenation (adding a path separator between the two strings if necessary)

Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export