Virtual Robot Simulator Official Guidebook
  • Coverpage
  • Introduction
  • FTC
    • Centerstage Game and Basic Rules
    • Powerplay Game and Basic Rules
  • VRS
  • Programming
    • User Interface
    • Blocks
      • LinearOpMode
      • Gamepad
      • Actuators
        • DcMotor
        • CRServo
        • Servo
      • Sensors
        • DistanceSensor
        • IMU
        • IMU-BNO055.Parameters
        • REV Color/Range Sensor
        • TouchSensor
      • Utilities
        • Acceleration
        • AngleUnit
        • AngularVelocity
        • Axis
        • Color
        • Orientation
        • PIDFCoefficients
        • Position
        • Range
        • Telemetry
        • Time
        • Vector
        • Velocity
      • Logic
      • Loops
      • Math
      • Text
      • Lists
      • Variables
      • Function
      • Miscellaneous
    • Basic Lessons
      • Drivetrain
      • IMU
      • Color Sensor
      • Telemetry
      • Range Sensor
      • Touch Sensor
      • Servo
      • CRServo
      • DCMotor
      • Logic and Loops
      • Functions
      • Tele-Op Control
    • Advanced Lessons
      • Advanced Tele-Op Control
    • Video Lessons
    • Simulation
    • Exploratory Activities
      • Wandering Robot
  • Robot Arena
    • Single Player
    • Activities
      • Coding Competition
      • CenterStage Competition
  • Conclusion
  • Author
  • Other Editions
Powered by GitBook
On this page
  1. Programming
  2. Blocks

Miscellaneous

PreviousFunctionNextBasic Lessons

Last updated 9 months ago

The Miscellaneous section in FTC block programming serves as a toolbox for various functions that don't neatly fit into other categories. The blocks range from comment, format numbers, to how to handle null value.

Comment

Comments serve as explanatory notes within your code. They have no impact on the Robot, no on the telemetry.

roundDecimal

Returns a number value of the given number rounded to the given precision. In the example, the block returns 3.14.

Key points:

  • Returns a numeric value.

formatNumber

Rounds a number to a certain precision and returns the rounded number as text. In the example, the block returns text “3.14”.

Key points:

  • Returns a text, instead of a numeric value.

  • Padded with 0 if necessary. For example, when 3.14 is rounded to precision of 3, “3.140” is returned.

null

null. It represents the absence of a value or object.

isNull

Returns true if the given value is null. Returns false if the given value is not null.

isNotNull

Returns true if the given value is not null. Returns false if the given value is null.