string literal error?

badmadevil badmadevil at gmail.com
Thu May 8 11:37:17 PDT 2008


badmadevil wrote:
> Hi, sorry if already discussed.
> 
> codes:
>   string x = "bug?" ;
>   string y = "bug?" ;
>   string z = "bug?".reverse ;
>   writefln("%s : %s : %s", x, y, z) ;
>   x.reverse ;

same effect if x is replace with literal "bug?", ie.
   "bug?".reverse ;

>   writefln("%s : %s : %s", x, y, z) ;
> 
> output - D 1.027 & 2.013:
>  >?gub : ?gub : ?gub
>  >bug? : bug? : bug?
> 
> Should x, y, z be independent to each others?


More information about the Digitalmars-d-learn mailing list