Can you shrink it further?

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 10 20:31:29 PDT 2016


On Tuesday, 11 October 2016 at 03:18:24 UTC, Lurker wrote:
>
> Pardon me asking, but why all these gotos instead of else ifs:
>
>   if (c < 192)
>   {
>     char_length = 2;
>   }
>   else if (c < 240)
>   {
>     char_length = 3;
>   } else if (...) {
>   }
>
> Does it have any effect on generated code (I don't think it 
> should)?

No it does not.
I wrote the gotos because that is how I am used to thinking about 
code.
If else should work fine here.



More information about the Digitalmars-d mailing list