Re: How to cast arrays?

2019-03-01 Thread Matheus via Digitalmars-d-learn
On Saturday, 2 March 2019 at 02:14:01 UTC, Murilo wrote: How do I cast a ubyte[] into uint[]? It keeps raising an error, I have read the documentation saying there are restrictions for that concerning the length of the arrays. By the way here is how: void foo(){ ubyte[] x = [1,2]; auto

Re: How to cast arrays?

2019-03-01 Thread Matheus via Digitalmars-d-learn
On Saturday, 2 March 2019 at 02:14:01 UTC, Murilo wrote: How do I cast a ubyte[] into uint[]? It keeps raising an error, I have read the documentation saying there are restrictions for that concerning the length of the arrays. https://dlang.org/spec/expression.html#cast_expressions "Casting

Re: How to cast arrays?

2019-03-01 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, Mar 02, 2019 at 02:14:01AM +, Murilo via Digitalmars-d-learn wrote: > How do I cast a ubyte[] into uint[]? It keeps raising an error, I have > read the documentation saying there are restrictions for that > concerning the length of the arrays. That depends on what you're trying to

How to cast arrays?

2019-03-01 Thread Murilo via Digitalmars-d-learn
How do I cast a ubyte[] into uint[]? It keeps raising an error, I have read the documentation saying there are restrictions for that concerning the length of the arrays.