Vars: BarTyp(""); XXX("");
Switch(BarType_ex)
begin
Case 1: BarTyp = "Ticks"; XXX="yyy";
Case 2: BarTyp = "Minutes"; XXX="yyy";
Default: BarTyp = ""; XXX="yyy"; // compile error
end;
Case 1 or Case 3 allows multiple statements without begin/end blocking.
However, Default does NOT.
Inconsistent syntax, isn't it?
switch/case statement's Default syntax inconsistent?
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007