Break/Continue Structure
Rory Starkweather
starkweatherr at mchsi.com
Fri Mar 24 11:13:14 PST 2006
follows a clearer version (with longer variable names ;) ):
>
> void main() {
> char[] string = "едц"; // contains 6 UTF-8 code units
> foreach(uint index, dchar character; string)
> writefln("character = %s, index = %s",character,index);
> }
>
> In this case, the c suffix is superfluous since the data type of string
> (char[]) makes the conversion implicit.
>
> /Oskar
So this is like using & after a number in VB to say that it is type
Long? I thought that kind of thing was only used in languages that
didn't require variable type declarations. I can see how it would come
in handy though.
Thanks.
More information about the Digitalmars-d-learn
mailing list