Skip to content
Bit Quirky Round Trip
Visual Scripting

Search documentation

All topics and APIs

Close returns focus to Search.

What are you looking for?

Try a common topic or enter a complete API identifier.

Browse the reference instead

Esc closes · Tab reaches results · Enter opens the focused link

v0.89.0
Menu

Operators and expressions

Combine values with arithmetic, comparisons, logic, and conditional expressions.

A coin adds one to a count, multiplies that count by a score value, and checks whether a goal condition has been met. Operators turn those small values into a decision.

ScoreCounter.AddCoins uses += twice. The second assignment combines multiplication and addition while preserving the order C# evaluates them.

Use arithmetic for numbers, comparisons for decisions, and logical operators to combine booleans. The conditional ?: chooses one of two values. Null-coalescing ?? supplies a fallback. Null-conditional access ?. or ?[ guards the receiving pin and skips the access when the receiver is null.

Round Trip models a compound assignment as a SET fed by an operation. Score += amount is a Score read flowing through Add and back into the Score SET. The source spelling remains += while that operation still reads the same value it sets.

An operation produces a value and never runs on its own, so the menu that opens when you drop a wire from an execution pin onto empty canvas leaves out the arithmetic, Concat, comparison, and logical rows. Place them from empty canvas or from a data pin, then wire their result into the statement that uses it.

The AddCoins graph showing compound assignments
Figure 1. Coins += count and the score calculation as a read feeding an operation that feeds a SET.
  1. Right-click empty canvas and open the operators category.
  2. Pick an arithmetic operation such as Add, Subtract, Multiply, Divide, or Modulo. Integer inputs also offer bitwise and shift operations.
  3. To join text, pick Concat. Its result is a string from the start, and either side can take a string or another value, as in "score: " + points.
  4. Fill the left and right pins with wires or literals. The result pin takes its type from the operands.
  5. For a boolean result, choose a comparison such as Equals, Greater Than, or Less Than, or combine booleans with And and Or.
  6. Use a conditional value when one condition selects between two results. Use a coalescing value when a missing left value should fall back to the right.
  7. To alter an existing operation, right-click it and choose change operator. The offered choices are filtered by the operand types. Concat, comparison and logical operations have no change operator row.
  8. Connect an operation back into the SET for the same target when you want read-modify-write behavior.
  9. Press Compile. Round Trip recomposes the containing statement with C# precedence and required parentheses.

When it goes wrong

SymptomCheckFix
An operator choice is missingCheck the operand types.Connect compatible values first, then open change operator again.
Compile reports a missing operandLook for a hollow left or right pin.Wire or type every required operand.
A compound assignment becomes longhandSee whether the operation still reads the same target the SET writes.Restore that read if the compound meaning is intended.
Full-size image