On Friday, March 11, 2011 14:39:43 Stewart Gordon wrote:
> On 11/03/2011 21:51, Steven Schveighoffer wrote:
>
>
> >> Presumably there's a reason that it's been provided for uint but not
> >> ushort or ulong
> >
> > I think things in std.intrinsic are functions that tie directly to CPU
> > fe
On 10/03/2011 12:18, Steven Schveighoffer wrote:
On Wed, 09 Mar 2011 18:19:55 -0500, Joel Christensen
wrote:
This is on Windows 7. Using a def file to stop the terminal window
coming up.
win.def
EXETYPE NT
SUBSYSTEM WINDOWS
bug.d
import std.stdio;
import std.string;
void main() {
auto f = F
Without testing: foreach (f; take(recurrence!("a[n-1] + a[n-2]")(0UL, 1UL), 50))
teo Wrote:
> Just curious: How can I get ulong here?
>
> foreach (f; take(recurrence!("a[n-1] + a[n-2]")(0, 1), 50))
> {
> writeln(f);
> }
Just curious: How can I get ulong here?
foreach (f; take(recurrence!("a[n-1] + a[n-2]")(0, 1), 50))
{
writeln(f);
}
Results:
0
1
1
2
3
5
8
..
1134903170
1836311903
-1323752223
512559680
-811192543
On 11/03/2011 21:51, Steven Schveighoffer wrote:
Presumably there's a reason that it's been provided for uint but not ushort or
ulong
I think things in std.intrinsic are functions that tie directly to CPU features,
True, but...
so presumably, the CPU only provides the possibility for
On Fri, 11 Mar 2011 16:42:59 -0500, Stewart Gordon
wrote:
On 11/03/2011 19:50, Ali Çehreli wrote:
There is also std.intrinsic.bswap
Well spotted. I don't tend to look at std.intrinsic much.
Presumably there's a reason that it's been provided for uint but not
ushort or ulong
I th
On 11/03/2011 19:50, Ali Çehreli wrote:
There is also std.intrinsic.bswap
Well spotted. I don't tend to look at std.intrinsic much.
Presumably there's a reason that it's been provided for uint but not ushort or
ulong
Stewart.
On 03/11/2011 11:18 AM, Stewart Gordon wrote:
On 11/03/2011 18:46, Steven Schveighoffer wrote:
I am not sure what facilities Phobos provides for reading/writing
integers in network
order (i.e. Big Endian), but I'm sure there's something.
http://www.digitalmars.com/d/1.0/phobos/std_stream.html
On 11/03/2011 18:46, Steven Schveighoffer wrote:
I am not sure what facilities Phobos provides for reading/writing integers in
network
order (i.e. Big Endian), but I'm sure there's something.
http://www.digitalmars.com/d/1.0/phobos/std_stream.html
EndianStream
I haven't experimented with it.
On Fri, Mar 11, 2011 at 11:48 AM, Caligo wrote:
>
>
> On Tue, Mar 1, 2011 at 1:15 PM, Peter Lundgren
> wrote:
>
>> That worked, thanks. This is interesting because the example used in "The
>> D
>> Programming Language" on page 83 gets away with it just fine. I had no
>> problem
>> running this:
nrgyzer wrote:
I'm trying to read a png file and I'm having some trouble with the
chunk-size. Each chunk of a png file begins with a 4 byte (unsigned)
integer. When I read this 4 byte integer (uint) I get an absolutely
incorrect length. My code currently looks like:
void main(string args) {
On Fri, 11 Mar 2011 13:43:19 -0500, nrgyzer wrote:
I'm trying to read a png file and I'm having some trouble with the
chunk-size. Each chunk of a png file begins with a 4 byte (unsigned)
integer. When I read this 4 byte integer (uint) I get an absolutely
incorrect length. My code currently look
I'm trying to read a png file and I'm having some trouble with the
chunk-size. Each chunk of a png file begins with a 4 byte (unsigned)
integer. When I read this 4 byte integer (uint) I get an absolutely
incorrect length. My code currently looks like:
void main(string args) {
File f = new File
On Tue, Mar 1, 2011 at 1:15 PM, Peter Lundgren wrote:
> That worked, thanks. This is interesting because the example used in "The D
> Programming Language" on page 83 gets away with it just fine. I had no
> problem
> running this:
>
> result ~= to!string(bitsSet(b)) ~ ", ";
>
How did you get tha
On Fri, 11 Mar 2011 04:50:38 -0500, d coder wrote:
Greetings
Please look at the code down here. When compiled and run, I get the
message
"Call to postblit" printed. I think it is because of the foreach block,
because the variable "i" is not declared as ref there. Is there a way to
make it a
Greetings
Please look at the code down here. When compiled and run, I get the message
"Call to postblit" printed. I think it is because of the foreach block,
because the variable "i" is not declared as ref there. Is there a way to
make it a ref?
Regards
- Puneet
import std.stdio;
struct Foo {
== Auszug aus Jonathan M Davis (jmdavisp...@gmx.com)'s Artikel
> On Thursday, March 10, 2011 11:28:04 bearophile wrote:
> > useo:
> > > is it possible to declare a enum where all entries are
instances of a
> >
> > > class (or struct), like the following:
> > I don't think so. Enums are compile-time
17 matches
Mail list logo