Switch block. Tabbed view vs Flat view. Pro Preview

In some cases we may want to use the switch block as a simple if-clause: execute the given action only if the condition is met, otherwise do nothing. Other times you may have some nested switch blocks that make the program too big to be shown on one screen. In both cases using tabbed view may be handy.

To access the full video please subscribe to FLLCasts.com

Subscribe

  • #928
  • 26 Sep 2018

So far we have covered switch blocks that have a block(s) in both their true and their false case. This use of the block is called if-else operator.

content pictureWhen there are blocks in just one of the cases, we say that it is an if-operator:

content picture

In both cases the switch block is in Flat View. However, when the block is used as an if-operator, it is useful to use the Tabbed View of the block:

content picture

You can change the view of the block from the upper left corner as shown bellow:

 

Of course, you can use Tabbed view for if-else operator too:

 

Courses and lessons with this Tutorial

This Tutorial is used in the following courses and lessons

Image for Instructors Remote Training
  • 136
  • 280:11
  • 156
Image for Switch
  • 7
  • 0
  • 7
  • 3d_rotation 1
Image for Robotics with LEGO - Level 3.0 - Security systems
  • 50
  • 1:03
  • 213
Image for Lesson 7 - Card reader
  • 6
  • 7
  • 8
  • 3d_rotation 1