You can try http://code.dlang.org/packages/mir-random
I am using theme here:
https://github.com/TechEmpower/FrameworkBenchmarks/blob/b9cc153dcd1c20e78197b0191536f0d11b8ca554/frameworks/D/vibed/source/postgresql.d#L49
On Sun, Aug 4, 2019 at 12:20 AM Giovanni Di Maria via
Digitalmars-d-learn wrote
On Sun, Aug 4, 2019 at 11:49 AM Daniel Kozak wrote:
>
> You can try http://code.dlang.org/packages/mir-random
>
> I am using theme here:
> https://github.com/TechEmpower/FrameworkBenchmarks/blob/b9cc153dcd1c20e78197b0191536f0d11b8ca554/frameworks/D/vibed/source/postgresql.d#L49
>
> On Sun, Aug 4,
On Saturday, 3 August 2019 at 12:29:18 UTC, Russel Winder wrote:
Knowing many paradigms well is proven experimentally (see the
work by Petre, Green, Gilmore, and others) to improve
capability in any given language. So knowing Java, Prolog,
Lisp, Python, SQL, C, Go, Rust, D, Kotlin, Groovy, R
Hi,
The snippet below will produce an "infinite loop" because
obviously "ubyte u" will overflow after 255:
import std.stdio;
void main(){
ubyte u = 250;
for(;u<256;++u){
writeln(u);
}
}
Question: Is there a way (Flag) to prevent this?
Matheus.
On Sunday, 4 August 2019 at 18:12:48 UTC, matheus wrote:
Hi,
The snippet below will produce an "infinite loop" because
obviously "ubyte u" will overflow after 255:
import std.stdio;
void main(){
ubyte u = 250;
for(;u<256;++u){
writeln(u);
}
}
Question: Is there a way (Fla
On Sunday, 4 August 2019 at 18:15:30 UTC, Max Haughton wrote:
What do you want to do? If you just want to count to 255 then
use a foreach
This was just an example, what I'd like in this code is either:
Get an error (exception) when overflow or even an warning (Only
if "some" flag was active).
On Sunday, 4 August 2019 at 18:22:30 UTC, matheus wrote:
On Sunday, 4 August 2019 at 18:15:30 UTC, Max Haughton wrote:
What do you want to do? If you just want to count to 255 then
use a foreach
This was just an example, what I'd like in this code is either:
Get an error (exception) when over
On Sunday, 4 August 2019 at 18:22:30 UTC, matheus wrote:
On Sunday, 4 August 2019 at 18:15:30 UTC, Max Haughton wrote:
What do you want to do? If you just want to count to 255 then
use a foreach
This was just an example, what I'd like in this code is either:
Get an error (exception) when over
On Sunday, 4 August 2019 at 18:38:34 UTC, Paul Backus wrote:
...
Use std.experimental.checkedint:
import std.stdio;
import std.experimental.checkedint;
void main()
{
for(Checked!(ubyte, Throw) u = ubyte(250); u < 256; ++u) {
writeln(u.get);
}
}
An exception will be thrown when
On 08/04/2019 11:12 AM, matheus wrote:
Hi,
The snippet below will produce an "infinite loop" because obviously
"ubyte u" will overflow after 255:
import std.stdio;
void main(){
ubyte u = 250;
for(;u<256;++u){
writeln(u);
}
}
Question: Is there a way (Flag) to prevent
10 matches
Mail list logo