switch/case statement's Default syntax inconsistent?

Questions about MultiCharts and user contributed studies.
2haerim
Posts: 502
Joined: 01 Sep 2006
Been thanked: 2 times

switch/case statement's Default syntax inconsistent?

Postby 2haerim » 02 Aug 2008

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?

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 05 Aug 2008

You are right HaeRim. There is inconsistency which will soon be fixed.


Return to “MultiCharts”