On Friday, 30 December 2022 at 09:29:16 UTC, novice2 wrote:
On Friday, 30 December 2022 at 04:43:48 UTC, Salih Dincer wrote:
  ...
  // example one:
  char[] str1 = "cur:€_".dup;
  ...
  // example two:
  dchar[] str2 = cast(dchar[])"cur:€_"d;
  ...
SDB@79

why you use .dup it example one, but not use in example two?

dchar[] str2 = cast(dchar[])"cur:€_"d.dup;

If I do not use .dup in the 1st example and convert as cast(char[]), it gives an error. However, in the 2nd example using .dup does nothing. It's not working anyway!

On Friday, 30 December 2022 at 05:46:32 UTC, Richard (Rikki) Andrew Cattermole wrote:
Of course; I cannot see anything else that could cause this in the assembly either.

I'm not sure I understand this issue.

SDB@79

  • dChar Error Salih Dincer via Digitalmars-d-learn
    • Re: dChar E... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
      • Re: dCh... Salih Dincer via Digitalmars-d-learn
        • Re:... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
    • Re: dChar E... novice2 via Digitalmars-d-learn
      • Re: dCh... Salih Dincer via Digitalmars-d-learn
        • Re:... matheus via Digitalmars-d-learn
          • ... Salih Dincer via Digitalmars-d-learn
            • ... matheus via Digitalmars-d-learn
              • ... Ali Çehreli via Digitalmars-d-learn
                • ... matheus via Digitalmars-d-learn
                • ... Salih Dincer via Digitalmars-d-learn
                • ... Salih Dincer via Digitalmars-d-learn
                • ... Ali Çehreli via Digitalmars-d-learn
                • ... Salih Dincer via Digitalmars-d-learn

Reply via email to