I have often looked at API say the android api where you can add a pipe between arguments to combine them. Say *CENTER_VERTICAL|CENTER_HORIZONTAL*. How is this done ? Can anyone show me an example where i can pass multiple arguments to a function chained as above ? How do i read them ?
Kind Regards
The vertical bar is actually a bitwise OR, so the method only works when the arguments are “flags” or bit fields.
e.g.
If the args are just “any old int”, it probably wont do what you think:
e.g.