Hi,
Why the program can not return different types of data from the
conditional operator?
-
import std.stdio;
auto foo() {
if (true) {
return 0;
} else
return "true";
}
void main() {
writeln(foo);
}
On Thursday, 23 April 2015 at 04:59:47 UTC, Rikki Cattermole
wrote:
On 23/04/2015 4:53 p.m., Jens Bauer wrote:
On Thursday, 23 April 2015 at 04:48:16 UTC, Rikki Cattermole
wrote:
Ehh, maybe you should setup a e.g. vm of e.g. Linux Mint and
use e.g. Github via it.
:) When having a PowerPC base
On Thursday, 23 April 2015 at 09:48:21 UTC, Dennis Ritchie wrote:
Hi,
Why the program can not return different types of data from the
conditional operator?
-
import std.stdio;
auto foo() {
if (true) {
return 0;
} else
return "true";
}
void
On 23/04/2015 9:54 p.m., Jens Bauer wrote:
On Thursday, 23 April 2015 at 04:59:47 UTC, Rikki Cattermole wrote:
On 23/04/2015 4:53 p.m., Jens Bauer wrote:
On Thursday, 23 April 2015 at 04:48:16 UTC, Rikki Cattermole wrote:
Ehh, maybe you should setup a e.g. vm of e.g. Linux Mint and use e.g.
Gi
On Thursday, 23 April 2015 at 09:48:21 UTC, Dennis Ritchie wrote:
Hi,
Why the program can not return different types of data from the
conditional operator?
-
import std.stdio;
auto foo() {
if (true) {
return 0;
} else
return "true";
}
void
On Thursday, 23 April 2015 at 10:06:45 UTC, John Colvin wrote:
On Thursday, 23 April 2015 at 09:48:21 UTC, Dennis Ritchie
wrote:
Hi,
Why the program can not return different types of data from
the conditional operator?
-
import std.stdio;
auto foo() {
if (true) {
Thank you all.
I did not know before, that this behavior is characteristic of
dynamically typed programming languages.
On Thursday, 23 April 2015 at 10:26:09 UTC, rumbu wrote:
On Thursday, 23 April 2015 at 10:06:45 UTC, John Colvin wrote:
On Thursday, 23 April 2015 at 09:48:21 UTC, Dennis Ritchie
wrote:
Hi,
Why the program can not return different types of data from
the conditional operator?
-
import std
On 4/23/15 5:54 AM, Jens Bauer wrote:
On Thursday, 23 April 2015 at 04:59:47 UTC, Rikki Cattermole wrote:
On 23/04/2015 4:53 p.m., Jens Bauer wrote:
On Thursday, 23 April 2015 at 04:48:16 UTC, Rikki Cattermole wrote:
Ehh, maybe you should setup a e.g. vm of e.g. Linux Mint and use e.g.
Github
I'm intrested in fibers and async io.
Could anyone suggest articles, books or tutorials about the
subject?
Thank you
On 04/23/2015 06:56 AM, ref2401 wrote:
I'm intrested in fibers and async io.
Could anyone suggest articles, books or tutorials about the subject?
Thank you
I am working on adding a Fibers chapter to my book. Although it is still
a draft and not linked from any other page, I've made it online:
I got the OK to submit the D library to Eclipse Paho. So,
hopefully within the next few weeks there will be a Paho
incubator project for the D language client.
Awesome!
On Thursday, 23 April 2015 at 12:14:59 UTC, Steven Schveighoffer
wrote:
On 4/23/15 5:54 AM, Jens Bauer wrote:
:) When having a PowerPC based Mac, you're living in a land of
"no support".
yikes! time for an upgrade :)
:)
I'm only staying with my PPC Mac for two reasons: My PCB design
softwa
On Thursday, 23 April 2015 at 14:22:01 UTC, Ali Çehreli wrote:
On 04/23/2015 06:56 AM, ref2401 wrote:
http://ddili.org/ders/d.en/fibers.html
I appreciate any feedback before the book is finally printed
sometime before DConf.
This is great information. I didn't know anything about Fibers
be
Hy, i'm new @ D and i come from python.
Sorry for my engish, i understand good, but i write like a cow
spanish.
I make a little programm to add human's name and age and a
function to write out alls humans in the list.
Here is the source:
http://dpaste.dzfl.pl/0a0da462225d
The problem is, i
hmm the paste is away ?!? here i post my source one more time.
[code]
import std.stdio;
import std.string;
struct Human {
string name;
ushort age;
};
void print_human_list(Human[] human_list){
foreach(human; human_list){
writeln(human.name);
writeln(human.age);
On 4/23/15 1:17 PM, kerze wrote:
The problem is, it writes instant "Name: Age:" at the standart output.
readf reads the element from the stream, and NOTHING MORE, it leaves the
newline on the stream.
So the next readf then reads the newline as a string. You can fix this
by using readf(" %s"
The paste is still there.
readf leaves the \n from pressing enter in stdin, which gets read
by the next function that's accessing it.
I answered a similiar question in another thread:
http://forum.dlang.org/post/jwxfaztgsyzwqpzaj...@forum.dlang.org
I see two other mistakes in your code as well:
Willkommen in der D Community. ;)
So many Thanks @Steven and Jacques, answer's more than a only;
"do this" ;)
On Thursday, 23 April 2015 at 17:18:01 UTC, kerze wrote:
Hy, i'm new @ D and i come from python.
Sorry for my engish, i understand good, but i write like a cow
spanish.
I make a little programm to add human's name and age and a
function to write out alls humans in the list.
Here is the sour
On Thursday, 23 April 2015 at 16:57:30 UTC, Jens Bauer wrote:
On Thursday, 23 April 2015 at 14:22:01 UTC, Ali Çehreli wrote:
On 04/23/2015 06:56 AM, ref2401 wrote:
http://ddili.org/ders/d.en/fibers.html
I appreciate any feedback before the book is finally printed
sometime before DConf.
This
On Thursday, 23 April 2015 at 19:24:31 UTC, Chris wrote:
On Thursday, 23 April 2015 at 16:57:30 UTC, Jens Bauer wrote:
3: Audio mixing and playback (eg. a MOD player for instance).
5: Queueing up a bunch of different jobs;
At the moment I'm using threads to implement a speech
synthesizer. It
It also works:
-
import std.conv;
import std.stdio;
import std.string;
struct Human {
string name;
ushort age;
}
void print_human_list(Human[] human_list) {
foreach(human; human_list) {
writeln(human.name);
writeln(human.age);
24 matches
Mail list logo