220 33736 <b73a0c61-6f73-4eb6-bb30-87c8bbefe2a4@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Constantin-Flavius Nistor <costelnistor12@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: A more advanced switch
Date: Wed, 9 Aug 2017 12:42:50 -0700 (PDT)
Lines: 697
Approved: news@gmane.org
Message-ID: <b73a0c61-6f73-4eb6-bb30-87c8bbefe2a4@isocpp.org>
References: <f8c908e2-d06f-4cd1-bda0-fe2b97fd21f1@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_95_1937592132.1502307770457"
X-Trace: blaine.gmane.org 1502307781 23554 195.159.176.226 (9 Aug 2017 19:43:01 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 9 Aug 2017 19:43:01 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCGIBI4KUYIRBPGLVXGAKGQE2VKEL4A@isocpp.org Wed Aug 09 21:42:56 2017
Return-path: <std-proposals+bncBCGIBI4KUYIRBPGLVXGAKGQE2VKEL4A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f200.google.com ([209.85.161.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCGIBI4KUYIRBPGLVXGAKGQE2VKEL4A@isocpp.org>)
	id 1dfWsW-0005Ss-4r
	for gclcip-std-proposals@m.gmane.org; Wed, 09 Aug 2017 21:42:52 +0200
Original-Received: by mail-yw0-f200.google.com with SMTP id v17sf114351081ywh.15
        for <gclcip-std-proposals@m.gmane.org>; Wed, 09 Aug 2017 12:42:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=ZNb8JozFj+jNK/orjhZkHgogEVPeWkCkiu3dVCzDkcs=;
        b=KwIlDn6tJokvV63pA61v5gx7Ns8YGUD5jfEIzbZrQ05MHTLCbE49Kx9HUb2t5UbaIA
         HYXEd7btRdvZ9x6rPe9F/mjET3EUfGhDRUElqhdfV1c+zyxboS19wIP9ZqhQWn5ui45+
         oMXjtgePOuU7ABaBmojMygv/rd7KtZTO5OplVBLfYFYRgkFETvkdLsRJB0Isl+tmFVkG
         t3VJvjOeF55ObvDqQQCLLrsSUGqX7g4Zwmu9H8XG2MDPw063Xfrav7IxRoOTb2pGm/sn
         FqHXfMzL8xD9xZGQQHeqewDfOvAeZWfZMKdQCpiaxvDZz+jh9oW8TjpcZC1UtmWlPxgj
         mDFA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=ZNb8JozFj+jNK/orjhZkHgogEVPeWkCkiu3dVCzDkcs=;
        b=BMkbc1NInYj4W7TpowuhGkkX/hZF9r+ARO5hL0+WGThhxeFUyarE2Thz/QHoVy7I3I
         0qOYG2ZSI9mWzV2kbRgiJ7/Fps4y/Sm/3yoxqS8UewmE2I+k1eT5nf02pA1N5dPQdo4p
         3YkVGgR+hiUBSOeXvyPCTaP2HQkRUM3jEl4kZurl/zYKrEURPC/piOcNM2qC+hEdKTq5
         89R/U35Adqxl4c03817EZyf3zREbEIO0K7/Ey7+mZi24KB2wk4NCEDikEoRMvPmPMdp7
         SCK0lYWoPFI1pbdySXynbvfYMDZ5z1aoetM6hWUPOFfE1SuXy1hYlowYU0kQ3HUUuiA1
         bSlg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=ZNb8JozFj+jNK/orjhZkHgogEVPeWkCkiu3dVCzDkcs=;
        b=GLfus4kcXfkanDK3TEenFLXupw+bJFQ9Xf/KVbt9YU7WJkQt5EBL6oM5s7Jp6Vxle7
         TcikJ4yXfwPpaesStFbc4eHf73njtXwySHbfTCVB9+jOiWPf6X4IcDxT7JUb/mFvt8yN
         PRH4nHpfwdbMbsV35/nxQ3pJDv0JwgeXu3uWdNnWAym+SDUdA/zmJsH+uDIbhvNj6xAG
         j8JwIn8PM2exci9CZw25eeWo5EhIdm62yrP2xSerHHfgEyIKkgwzeUcTK2Qau98JkJ+r
         zHmJiyyoUQYZ8m2wcOVLprpe/Cl8gRyHmJ6qZPse6oRIkf0JKcfQ1bxaVLokrca6VWZ6
         puUg==
X-Gm-Message-State: AHYfb5iC3KOYql5vginpx4ss4+/M86KdjIgGX/fLro2Z5H5RKbOVPVBe
	AhYqwrPYImUuNaa2
X-Received: by 10.129.103.213 with SMTP id b204mr5871495ywc.228.1502307773401;
        Wed, 09 Aug 2017 12:42:53 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.19.75 with SMTP id 72ls10155986itz.11.gmail; Wed, 09 Aug
 2017 12:42:52 -0700 (PDT)
X-Received: by 10.31.169.17 with SMTP id s17mr49165vke.11.1502307770948;
        Wed, 09 Aug 2017 12:42:50 -0700 (PDT)
In-Reply-To: <f8c908e2-d06f-4cd1-bda0-fe2b97fd21f1@isocpp.org>
X-Original-Sender: costelnistor12@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:33736
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33736>

------=_Part_95_1937592132.1502307770457
Content-Type: multipart/alternative; 
	boundary="----=_Part_96_1631201143.1502307770458"

------=_Part_96_1631201143.1502307770458
Content-Type: text/plain; charset="UTF-8"

On Wednesday, 2 August 2017 09:19:39 UTC+3, wei zhang wrote:
>
> We can only add silently with case 5, 6:
>

I know that, probably the ".." or "..." range thing too.


On Wednesday, 9 August 2017 16:08:05 UTC+3, gmis...@gmail.com wrote:
>
>
> I would very much like to see some changes to switch.
>
> I'd like something like:
>
> switch break (x) // cases break by default;
> {
>     case 1: whatever();
>     case 2: whatever();
> }
>
> I'd also like, for at least this variation of switch, for a case to be a 
> scope by default, such that is ok:
> So that variables can be declared without requiring more braces.
>
> switch break (x) // cases break by default;
> {
>     case 1: int z = 1; whatever(z); // not an error
>     case 2: whatever();
> }
>
> I think this would make most switch statements a lot less verbose.
> It seems a lot of the flexibility of the classic switch just isn't 
> required.
> So this switch could be used when it's not and the existing switch can be 
> used when it is.
>
> switch break seems easy to teach to me. So why not?
>
I actually like this idea ! "switch break" could be just right for this. It 
wouldn't break backwards compatibility. 


On Wednesday, 2 August 2017 17:58:42 UTC+3, Matthew Woehlke wrote:
>
> > 1. There's no need for break, there's no fallthrough. Advantage: we can 
> > easily "continue" and "break" loops from inside the "switch". 
>
> Disadvantage: you can't do this: 
>
>   case FOO: 
>     ...some code... 
>     [[fallthrough]]; 
>   case BAR: 
>     ...more code... 
>     break; 
>
> And yes, I've actually written code like that before. 
>
> -- 
> Matthew 

 
On Wednesday, 9 August 2017 20:08:18 UTC+3, Tony V E wrote:
>
> break by default is fine, how do I opt-out within switch break, or is it 
> all or nothing?
>
> switch break(x)
> {
> case 1:
> case 2:
>     foo();
> case 3:
>     bar();
> case 4:
>     etc();
>  }
>
>
> How do I get fallthru on case 1 to 2?
>
 
Well, for this we could use the current style switch. Or the [[fallthrough]] 
attribute could behave differently in a "switch break", it could enable the 
fallthrough there instead of only announcing it, if possible.


About the other too complex suggestions: I don't think that something 
similar to "case v = (50,...) // 50 < v" could be made reliably, I don't 
really know how jump tables really work, but I think that they work only 
for integers (so no possibility to use directly std::string ! probably only 
if it will get hashed into an int, but it will be faster than "if/else 
if/else" only if it would have many cases), without the possibility to 
actually check intervals, so a thing like "1..6" would actually expand to 
all those cases individually, it would only allow us to write it faster. It 
could give us a lot of benefits in these cases:

C++:
switch( someinteger )
{
    case 581: case 523: case 462: case 521: case 463: case 522: case 461: 
case 448: case 468: case 586:
    case 509: case 481: case 510: case 472: case 473: case 493: case 595: 
case 484: case 430: case 453:
    case 452: case 446: case 454: case 590: case 569: case 537: case 538: 
case 570: case 449: case 513:
    case 520: case 519: case 487: case 417: case 406: case 556: case 444: 
case 557:
        return 1;
}

Pawn (my proposal):
switch( someinteger )
{
    case 581, 523, 462, 521, 463, 522, 461, 448, 468, 586, 509, 481, 510, 
472, 473, 493, 595, 484, 430, 453,
         452, 446, 454, 590, 569, 537, 538, 570, 449, 513, 520, 519, 487, 
417, 406, 556, 444, 557:
             return 1;
}

And this could get a lot better, example:

C++:
// inside some function

for( unsigned int i = 0; i < liLength; i ++ )
{
    switch( lsString[ i ] )
    {
case '0': case '1': case '2': ...etc... case 'a': case 'b': ... etc ... 
case 'X': case 'Y': case 'Z':
case '[': case ']': case '(': case ')': case '$': case '@':
case '.': case '_': case '=': break;

default: return false;
}
}

Pawn (my proposal):
// inside some function

for( new i = 0; i < liLength; i ++ )
{
    switch( lsString[ i ] )
    {
        case '0' .. '9', 'a' .. 'z', 'A' .. 'Z', '[', ']', '(', ')', '$', 
'@', '.', '_', '=': { }
        default: return 0;
    }
}

It would get expanded at compile time. It's a lot nicer.

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/b73a0c61-6f73-4eb6-bb30-87c8bbefe2a4%40isocpp.org.

------=_Part_96_1631201143.1502307770458
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Wednesday, 2 August 2017 09:19:39 UTC+3, wei zhang wrot=
e:<blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; bor=
der-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div dir=3D"ltr=
">We can only add silently with case 5, 6:</div></blockquote><div><br></div=
><div>I know that, probably the &quot;..&quot; or &quot;...&quot; range thi=
ng too.</div><div><br></div><div><br></div><div>On Wednesday, 9 August 2017=
 16:08:05 UTC+3, gmis...@gmail.com wrote:<blockquote class=3D"gmail_quote" =
style=3D"margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 20=
4); padding-left: 1ex;"><div dir=3D"ltr"><div><br></div><div>I would very m=
uch like to see some changes to switch.</div><div><br></div><div>I&#39;d li=
ke something like:</div><div><br></div><div>switch break (x) // cases break=
 by default;</div><div>{</div><div>=C2=A0=C2=A0=C2=A0 case 1: whatever();</=
div><div>=C2=A0=C2=A0=C2=A0=C2=A0case 2: whatever();<br>}</div><div><br></d=
iv><div>I&#39;d also like, for at least this variation of switch,=C2=A0for=
=C2=A0a case=C2=A0to be a scope by default, such that is ok:</div><div>So t=
hat variables can be declared without requiring more braces.</div><div><br>=
</div><div><div>switch break (x) // cases break by default;</div><div>{</di=
v><div>=C2=A0=C2=A0=C2=A0 case 1: int z =3D 1; whatever(z); // not an error=
</div><div>=C2=A0=C2=A0=C2=A0=C2=A0case 2: whatever();<br>}</div><div><br><=
/div><div>I think this would make most switch statements a lot less verbose=
..</div><div>It seems a lot of the flexibility of the classic switch just is=
n&#39;t required.</div><div>So this switch could be used when it&#39;s not =
and the existing switch can be used when it is.</div><div><br></div><div>sw=
itch break seems easy to teach to me. So why not?</div></div></div></blockq=
uote><div>I actually like this idea ! &quot;switch break&quot; could be jus=
t right for this. It wouldn&#39;t break backwards compatibility.=C2=A0</div=
><div><br></div><div><br></div>On Wednesday, 2 August 2017 17:58:42 UTC+3, =
Matthew Woehlke wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0p=
x 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1=
ex;">&gt; 1. There&#39;s no need for break, there&#39;s no fallthrough. Adv=
antage: we can=C2=A0<br>&gt; easily &quot;continue&quot; and &quot;break&qu=
ot; loops from inside the &quot;switch&quot;.=C2=A0<br><br>Disadvantage: yo=
u can&#39;t do this:=C2=A0<br><br>=C2=A0 case FOO:=C2=A0<br>=C2=A0 =C2=A0 .=
...some code...=C2=A0<br>=C2=A0 =C2=A0 [[fallthrough]];=C2=A0<br>=C2=A0 case=
 BAR:=C2=A0<br>=C2=A0 =C2=A0 ...more code...=C2=A0<br>=C2=A0 =C2=A0 break;=
=C2=A0<br><br>And yes, I&#39;ve actually written code like that before.=C2=
=A0<br><br>--=C2=A0<br>Matthew=C2=A0</blockquote><div>=C2=A0</div><div>On W=
ednesday, 9 August 2017 20:08:18 UTC+3, Tony V E wrote:<blockquote class=3D=
"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; border-left: 1px solid rg=
b(204, 204, 204); padding-left: 1ex;"><div dir=3D"ltr"><div><div><div><div>=
<div><div><div><div><div>break by default is fine, how do I opt-out within =
switch break, or is it all or nothing?<br><br></div>switch break(x)<br>{<br=
></div>case 1:<br></div>case 2:<br></div>=C2=A0=C2=A0=C2=A0 foo();<br></div=
>case 3:<br></div>=C2=A0=C2=A0=C2=A0 bar();<br></div>case 4:<br></div>=C2=
=A0=C2=A0=C2=A0 etc();<br>=C2=A0}<br><br><br></div>How do I get fallthru on=
 case 1 to 2?</div></blockquote><div>=C2=A0</div></div><div>Well, for this =
we could use the current style switch. Or the<font color=3D"#000000">=C2=A0=
[[fallthrough]] attribute could behave differently in a &quot;switch break&=
quot;, it could enable the fallthrough there instead of only announcing it,=
 if possible.</font></div></div><div><font color=3D"#000000"><br></font></d=
iv><div><font color=3D"#000000"><br></font></div><div><font color=3D"#00000=
0">About the other too complex suggestions: I don&#39;t think that somethin=
g similar to &quot;</font><span style=3D"font-family: arial, sans-serif; fo=
nt-size: 12.8px;">case v =3D (50,...) // 50 &lt; v&quot; could be made reli=
ably, I don&#39;t really know how jump tables really work, but I think that=
 they work only for integers (so no possibility to use directly std::string=
 ! probably only if it will get hashed into an int, but it will be faster t=
han &quot;if/else if/else&quot; only if it would have many cases), without =
the possibility to actually check intervals, so a thing like &quot;1..6&quo=
t; would actually expand to all those cases individually, it would only all=
ow us to write it faster. It could give us a lot of benefits in these cases=
:</span></div><div><span style=3D"font-family: arial, sans-serif; font-size=
: 12.8px;"><br></span></div><div><span style=3D"font-family: arial, sans-se=
rif; font-size: 12.8px;">C++:</span></div><div><div class=3D"prettyprint" s=
tyle=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 1=
87); border-style: solid; border-width: 1px; word-wrap: break-word;"><code =
class=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #=
008;" class=3D"styled-by-prettify">switch</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> someinteger </span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"><br></span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by=
-prettify">case</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span><span style=3D"color: #066;" class=3D"styled-by-prettify">581<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">:</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">case</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066=
;" class=3D"styled-by-prettify">523</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">:</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-pre=
ttify">case</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> </span><span style=3D"color: #066;" class=3D"styled-by-prettify">462</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">:</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"c=
olor: #008;" class=3D"styled-by-prettify">case</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066;" cl=
ass=3D"styled-by-prettify">521</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">:</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify=
">case</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </s=
pan><span style=3D"color: #066;" class=3D"styled-by-prettify">463</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">:</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #008;" class=3D"styled-by-prettify">case</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=
=3D"styled-by-prettify">522</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">:</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">c=
ase</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #066;" class=3D"styled-by-prettify">461</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #0=
08;" class=3D"styled-by-prettify">case</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"s=
tyled-by-prettify">448</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">:</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">case</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><spa=
n style=3D"color: #066;" class=3D"styled-by-prettify">468</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" =
class=3D"styled-by-prettify">case</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"style=
d-by-prettify">586</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">:</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><=
br></span><span style=3D"color: rgb(0, 0, 0);"><span style=3D"color: #000;"=
 class=3D"styled-by-prettify">=C2=A0 =C2=A0 </span></span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">case</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066;" cla=
ss=3D"styled-by-prettify">509</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">:</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify"=
>case</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </sp=
an><span style=3D"color: #066;" class=3D"styled-by-prettify">481</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">:</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #008;" class=3D"styled-by-prettify">case</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=
=3D"styled-by-prettify">510</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">:</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">c=
ase</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #066;" class=3D"styled-by-prettify">472</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #0=
08;" class=3D"styled-by-prettify">case</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"s=
tyled-by-prettify">473</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">:</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">case</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><spa=
n style=3D"color: #066;" class=3D"styled-by-prettify">493</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" =
class=3D"styled-by-prettify">case</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"style=
d-by-prettify">595</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">:</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #008;" class=3D"styled-by-prettify">case</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #066;" class=3D"styled-by-prettify">484</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">case</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-=
prettify">430</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">:</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">case</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #066;" class=3D"styled-by-prettify">453</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"><br></span><span style=3D"color: rgb(0, 0, 0=
);"><span style=3D"color: #000;" class=3D"styled-by-prettify">=C2=A0 =C2=A0=
 </span></span><span style=3D"color: #008;" class=3D"styled-by-prettify">ca=
se</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span>=
<span style=3D"color: #066;" class=3D"styled-by-prettify">452</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #00=
8;" class=3D"styled-by-prettify">case</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"st=
yled-by-prettify">446</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">:</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">case</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span=
 style=3D"color: #066;" class=3D"styled-by-prettify">454</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" =
class=3D"styled-by-prettify">case</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"style=
d-by-prettify">590</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">:</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #008;" class=3D"styled-by-prettify">case</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #066;" class=3D"styled-by-prettify">569</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">case</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-=
prettify">537</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">:</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">case</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #066;" class=3D"styled-by-prettify">538</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">case</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-p=
rettify">570</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">:</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #008;" class=3D"styled-by-prettify">case</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D=
"color: #066;" class=3D"styled-by-prettify">449</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"s=
tyled-by-prettify">case</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-pretti=
fy">513</span><span style=3D"color: #660;" class=3D"styled-by-prettify">:</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><=
span style=3D"color: rgb(0, 0, 0);"><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify">=C2=A0 =C2=A0 </span></span><span style=3D"color: #008;"=
 class=3D"styled-by-prettify">case</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"style=
d-by-prettify">520</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">:</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #008;" class=3D"styled-by-prettify">case</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #066;" class=3D"styled-by-prettify">519</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">case</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-=
prettify">487</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">:</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">case</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #066;" class=3D"styled-by-prettify">417</span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">case</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-p=
rettify">406</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">:</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #008;" class=3D"styled-by-prettify">case</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D=
"color: #066;" class=3D"styled-by-prettify">556</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"s=
tyled-by-prettify">case</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-pretti=
fy">444</span><span style=3D"color: #660;" class=3D"styled-by-prettify">:</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">case</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"colo=
r: #066;" class=3D"styled-by-prettify">557</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">:</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br></span><span style=3D"color: rgb(0, 0, 0);"><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify">=C2=A0 =C2=A0=C2=A0<=
/span></span><span style=3D"color: rgb(0, 0, 0); font-family: Arial, Helvet=
ica, sans-serif;">=C2=A0 =C2=A0</span><span style=3D"color: rgb(0, 0, 0); f=
ont-family: Arial, Helvetica, sans-serif;">=C2=A0</span><span class=3D"styl=
ed-by-prettify" style=3D"font-family: Arial, Helvetica, sans-serif; color: =
rgb(0, 0, 136);">return</span><span class=3D"styled-by-prettify" style=3D"f=
ont-family: Arial, Helvetica, sans-serif; color: rgb(0, 0, 0);"> </span><sp=
an class=3D"styled-by-prettify" style=3D"font-family: Arial, Helvetica, san=
s-serif; color: rgb(0, 102, 102);">1</span><span class=3D"styled-by-prettif=
y" style=3D"font-family: Arial, Helvetica, sans-serif; color: rgb(102, 102,=
 0);">;</span></div><div class=3D"subprettyprint"><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">}</span></div></code></div><div style=3D""=
><font face=3D"arial, sans-serif"><span style=3D"font-size: 12.8px;"><br></=
span></font></div></div><div>Pawn (my proposal):</div><div><div class=3D"pr=
ettyprint" style=3D"background-color: rgb(250, 250, 250); border-color: rgb=
(187, 187, 187); border-style: solid; border-width: 1px; word-wrap: break-w=
ord;"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span style=
=3D"color: #008;" class=3D"styled-by-prettify">switch</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> someinteger </span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">)</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"><br></span><span style=3D"color: #008;" class=3D"styled-by-p=
rettify"><span style=3D"color: rgb(0, 0, 0);">=C2=A0 =C2=A0=C2=A0</span>cas=
e</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #066;" class=3D"styled-by-prettify">581</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066=
;" class=3D"styled-by-prettify">523</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-pre=
ttify">462</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #066;" class=3D"styled-by-prettify">521</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066=
;" class=3D"styled-by-prettify">463</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-pre=
ttify">522</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #066;" class=3D"styled-by-prettify">461</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066=
;" class=3D"styled-by-prettify">448</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-pre=
ttify">468</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #066;" class=3D"styled-by-prettify">586</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066=
;" class=3D"styled-by-prettify">509</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-pre=
ttify">481</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #066;" class=3D"styled-by-prettify">510</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066=
;" class=3D"styled-by-prettify">472</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-pre=
ttify">473</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #066;" class=3D"styled-by-prettify">493</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066=
;" class=3D"styled-by-prettify">595</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by-pre=
ttify">484</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #066;" class=3D"styled-by-prettify">430</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #066=
;" class=3D"styled-by-prettify">453</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0</span><span style=3D=
"color: #066;" class=3D"styled-by-prettify">452</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"s=
tyled-by-prettify">446</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #066;" class=3D"styled-by-prettify">454</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D=
"color: #066;" class=3D"styled-by-prettify">590</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"s=
tyled-by-prettify">569</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #066;" class=3D"styled-by-prettify">537</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D=
"color: #066;" class=3D"styled-by-prettify">538</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"s=
tyled-by-prettify">570</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #066;" class=3D"styled-by-prettify">449</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D=
"color: #066;" class=3D"styled-by-prettify">513</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"s=
tyled-by-prettify">520</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #066;" class=3D"styled-by-prettify">519</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D=
"color: #066;" class=3D"styled-by-prettify">487</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"s=
tyled-by-prettify">417</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #066;" class=3D"styled-by-prettify">406</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D=
"color: #066;" class=3D"styled-by-prettify">556</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"s=
tyled-by-prettify">444</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #066;" class=3D"styled-by-prettify">557</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">:</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=
=3D"" class=3D"styled-by-prettify"><font color=3D"#000000">=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0</font></span><span style=3D"color: #008;=
" class=3D"styled-by-prettify">return</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"st=
yled-by-prettify">1</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
<br></span><span style=3D"color: #660;" class=3D"styled-by-prettify">}</spa=
n></div></code></div><div><br></div></div><div>And this could get a lot bet=
ter, example:</div><div><br></div><div>C++:</div><div><div class=3D"prettyp=
rint" style=3D"background-color: rgb(250, 250, 250); border-color: rgb(187,=
 187, 187); border-style: solid; border-width: 1px; word-wrap: break-word;"=
><code class=3D"prettyprint"><div class=3D"subprettyprint"><font color=3D"#=
000088"><div class=3D"subprettyprint">// inside some function</div><div cla=
ss=3D"subprettyprint"><br></div><div class=3D"subprettyprint">for( unsigned=
 int i =3D 0; i &lt; liLength; i ++ )</div><div class=3D"subprettyprint">{<=
/div><div class=3D"subprettyprint">=C2=A0 =C2=A0 switch( lsString[ i ] )</d=
iv><div class=3D"subprettyprint">=C2=A0 =C2=A0 {</div><div class=3D"subpret=
typrint"><span style=3D"white-space:pre">		</span>case &#39;0&#39;: case &#=
39;1&#39;: case &#39;2&#39;: ...etc... case &#39;a&#39;: case &#39;b&#39;: =
.... etc ... case &#39;X&#39;: case &#39;Y&#39;: case &#39;Z&#39;:</div><div=
 class=3D"subprettyprint"><span style=3D"white-space:pre">			</span>case &#=
39;[&#39;: case &#39;]&#39;: case &#39;(&#39;: case &#39;)&#39;: case &#39;=
$&#39;: case &#39;@&#39;:</div><div class=3D"subprettyprint"><span style=3D=
"white-space:pre">			</span>case &#39;.&#39;: case &#39;_&#39;: case &#39;=
=3D&#39;: break;<br><br></div><div class=3D"subprettyprint"><span style=3D"=
white-space:pre">		</span>default: return false;</div><div class=3D"subpret=
typrint"><span style=3D"white-space:pre">	</span>}</div><div class=3D"subpr=
ettyprint">}</div></font></div></code></div><div><br></div></div><div>Pawn =
(my proposal):</div><div><div class=3D"prettyprint" style=3D"background-col=
or: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: sol=
id; border-width: 1px; word-wrap: break-word;"><code class=3D"prettyprint">=
<div class=3D"subprettyprint"><span style=3D"color: #008;" class=3D"styled-=
by-prettify">// inside some function<br><br>for</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"s=
tyled-by-prettify">new</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> i </span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> <=
/span><span style=3D"color: #066;" class=3D"styled-by-prettify">0</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> i </span><span style=3D"col=
or: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> liLength</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">;</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> i </span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">++</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
)</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=
=3D"" class=3D"styled-by-prettify"><font color=3D"#000000">=C2=A0 =C2=A0=C2=
=A0</font></span><span style=3D"color: #008;" class=3D"styled-by-prettify">=
switch</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> lsString</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">[</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> i </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">]</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"><br></span><span style=3D"color: #660;" class=3D"styled=
-by-prettify"><span style=3D"color: rgb(0, 0, 0);">=C2=A0 =C2=A0=C2=A0</spa=
n>{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></s=
pan><span style=3D"color: #008;" class=3D"styled-by-prettify"><span style=
=3D"color: rgb(0, 0, 0);">=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0</span>case</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #080;" class=3D"styled-by-prettify">&#39;0&#39;</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">..</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #080;" cla=
ss=3D"styled-by-prettify">&#39;9&#39;</span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> </span><span style=3D"color: #080;" class=3D"styled-by-p=
rettify">&#39;a&#39;</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>..</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #080;" class=3D"styled-by-prettify">&#39;z&#39;</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"c=
olor: #080;" class=3D"styled-by-prettify">&#39;A&#39;</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">..</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> </span><span style=3D"color: #080;" class=3D"sty=
led-by-prettify">&#39;Z&#39;</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #080;" class=3D"styled-by-prettify">=
&#39;[&#39;</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span>=
<span style=3D"color: #080;" class=3D"styled-by-prettify">&#39;]&#39;</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"co=
lor: #080;" class=3D"styled-by-prettify">&#39;(&#39;</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> </span><span style=3D"color: #080;" class=
=3D"styled-by-prettify">&#39;)&#39;</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #080;" class=3D"styled-by-pre=
ttify">&#39;$&#39;</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #080;" class=3D"styled-by-prettify">&#39;@&#39=
;</span><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span styl=
e=3D"color: #080;" class=3D"styled-by-prettify">&#39;.&#39;</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #080;=
" class=3D"styled-by-prettify">&#39;_&#39;</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #080;" class=3D"style=
d-by-prettify">&#39;=3D&#39;</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">:</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">}</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"c=
olor: #008;" class=3D"styled-by-prettify"><span style=3D"color: rgb(0, 0, 0=
);">=C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0</span>default</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">return</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"styled-by=
-prettify">0</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify"><span style=
=3D"color: rgb(0, 0, 0);">=C2=A0 =C2=A0=C2=A0</span>}</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">}</span></div></code></div><div><br></=
div></div><div>It would get expanded at compile time. It&#39;s a lot nicer.=
</div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/b73a0c61-6f73-4eb6-bb30-87c8bbefe2a4%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/b73a0c61-6f73-4eb6-bb30-87c8bbefe2a4=
%40isocpp.org</a>.<br />

------=_Part_96_1631201143.1502307770458--

------=_Part_95_1937592132.1502307770457--

.
