User Tools

Site Tools


docase

do case ... endcase

The do case statement is exactly as it was in the Clipper, the VO and the Vulcan.NET language:

do case
case cExpr == "abc"
  DoSomething()
case cExpr >= "d" .and. cExpr < "f"
  DoSomethingOther()
case Upper( cExpr ) == "z"
  DoAnotherThing()
otherwise
  DoWhatEverYouLike()
endcase

It is very flexible, but the flexibility comes at a cost: it is easy to make errors and it is slower than the switch statement. Is is another form of an if - elseif statement.

docase.txt · Last modified: 2018/08/20 06:06 by wolfgangriedmann