Error on documentation:

Feedback Case Number:
On the documentation, in the link: Controlling code flow — Xojo documentation

In part of phrase below, where say: because the color FFFF00 does not match any of the Case statements.

On the code, is wrong:
c = &cFF0000 ’ pure red,

should be:
c = &cFFFF00

The Select Case statement accepts an Else clause. The code in the Else clause executes only if none of the preceding cases match. The Else clause can be written as either “Else” or “Case Else”. In the following example, the Case Else clause executes because the color FFFF00 does not match any of the Case statements:

Var c As Color
c = &cFF0000 ’ pure red THIS IS WRONG, THE CORRECT SOULD BE: c = &cFFFF00

Select Case c
Case &c00FF00 ’ green
MessageBox(“Green”)
Case &cFF0000 ’ red
MessageBox(“Red”)
Case &c0000FF ’ blue
MessageBox(“Blue”)
Case Else
MessageBox(“None of the above”)
End Select

The point of this example is that the color &cFFFF00 does not match green or red or blue so the Case Else entry will be run. You should see the message: None of the above.

&cFFFF00 is the color yellow.

CleanShot 2023-12-24 at 22.16.41@2x


If you find errors in the documentation, it is best to tell Xojo directly. At the bottom of every page in the documentation, you will see

Click on the Let us know and you will directed to a website that you can inform the Xojo staff of the problem.

Merry Christmas.

Right, but the example code sets c to &cFF0000, not &cFFFF00 as it should.

You can also submit an issue against the documentation.

I was slightly confused. Not too uncommon.

Thanks for clarification.