Re: Counting an initialised array, and segments

2023-06-26 Thread Cecil Ward via Digitalmars-d-learn
On Monday, 26 June 2023 at 22:19:25 UTC, Jonathan M Davis wrote: On Monday, June 26, 2023 1:09:24 PM MDT Cecil Ward via Digitalmars-d-learn wrote: [...] [...] I completely agree with everything you said. I merely used aliases to give me the freedom to switch between having text in either U

Re: Counting an initialised array, and segments

2023-06-26 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, June 26, 2023 1:09:24 PM MDT Cecil Ward via Digitalmars-d-learn wrote: > No, point taken, a sloppy example. I don’t in fact do that in the > real code. I use dchar everywhere appropriate instead of uint. In > fact I have aliases for dstring and dchar and successfully did an > alternativ

Re: Counting an initialised array, and segments

2023-06-26 Thread Cecil Ward via Digitalmars-d-learn
On Monday, 26 June 2023 at 12:28:15 UTC, Jonathan M Davis wrote: On Monday, June 26, 2023 5:08:06 AM MDT Cecil Ward via Digitalmars-d-learn wrote: On Monday, 26 June 2023 at 08:26:31 UTC, Jonathan M Davis wrote: > On Sunday, June 25, 2023 4:08:19 PM MDT Cecil Ward via > > Digitalmars-d-learn wr

Re: Counting an initialised array, and segments

2023-06-26 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, June 26, 2023 5:08:06 AM MDT Cecil Ward via Digitalmars-d-learn wrote: > On Monday, 26 June 2023 at 08:26:31 UTC, Jonathan M Davis wrote: > > On Sunday, June 25, 2023 4:08:19 PM MDT Cecil Ward via > > > > Digitalmars-d-learn wrote: > >> I recently had some problems > >> > >> dchar[] arr

Re: Counting an initialised array, and segments

2023-06-26 Thread Cecil Ward via Digitalmars-d-learn
On Monday, 26 June 2023 at 08:26:31 UTC, Jonathan M Davis wrote: On Sunday, June 25, 2023 4:08:19 PM MDT Cecil Ward via Digitalmars-d-learn wrote: I recently had some problems dchar[] arr = [ ‘ ‘, TAB, CR, LF … ]; and I got errors from the compiler which led to me having to count the elements

Re: Counting an initialised array, and segments

2023-06-26 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, June 25, 2023 4:08:19 PM MDT Cecil Ward via Digitalmars-d-learn wrote: > I recently had some problems > > dchar[] arr = [ ‘ ‘, TAB, CR, LF … ]; > > and I got errors from the compiler which led to me having to > count the elements in the initialiser and declare the array with > an explic

Re: Counting an initialised array, and segments

2023-06-25 Thread novice2 via Digitalmars-d-learn
``` import std; auto arr = [dchar(' '), '\t', 0x0a, 0x10]; void main() { writeln("Hello D: ", typeid(arr)); } ```