Read whole file

2014-07-15 Thread pgtkda via Digitalmars-d-learn
How can i read the whole file if i use this: File("C:\\Users\\text\\Desktop\\test.csv", "r");

Re: Get folders in path

2014-07-15 Thread pgtkda via Digitalmars-d-learn
On Tuesday, 15 July 2014 at 08:38:30 UTC, sigod wrote: On Tuesday, 15 July 2014 at 08:31:10 UTC, pgtkda wrote: How can i get all folders from a given path? If I understood you correctly: http://dlang.org/phobos/std_file.html#.dirEntries Thanks, that's exactly what i was looking for.

Get folders in path

2014-07-15 Thread pgtkda via Digitalmars-d-learn
How can i get all folders from a given path?

Re: get number of items in DList

2014-07-14 Thread pgtkda via Digitalmars-d-learn
On Friday, 11 July 2014 at 14:48:26 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Fri, Jul 11, 2014 at 10:23:58AM -0300, Ary Borenszweig via Digitalmars-d-learn wrote: On 7/11/14, 4:46 AM, bearophile wrote: >pgtkda: > >>How can i get the number of items which are currently hold >>in a >>DL

get number of items in DList

2014-07-11 Thread pgtkda via Digitalmars-d-learn
How can i get the number of items which are currently hold in a DList?

Re: integer out of range

2014-07-03 Thread pgtkda via Digitalmars-d-learn
On Thursday, 3 July 2014 at 10:22:14 UTC, ponce wrote: On Thursday, 3 July 2014 at 10:15:25 UTC, pgtkda wrote: why is this possible? int count = 50_000_000; int is always 4 bytes, it can contains from -2_147_483_648 to 2_147_483_647. oh, ok. I thought it only contains numbers to 2_000_000,

integer out of range

2014-07-03 Thread pgtkda via Digitalmars-d-learn
why is this possible? int count = 50_000_000;

similar method as Math.Ceiling in c#

2014-07-02 Thread pgtkda via Digitalmars-d-learn
Is there a similar method as Math.Ceiling in D? http://msdn.microsoft.com/en-US/en-en/library/zx4t0t48(v=vs.110).aspx

Re: Integer max value

2014-07-02 Thread pgtkda via Digitalmars-d-learn
On Wednesday, 2 July 2014 at 08:58:46 UTC, Rene Zwanenburg wrote: On Wednesday, 2 July 2014 at 08:39:06 UTC, pgtkda wrote: Is there a way to get the max size of an integer? int.max The same exists for other built-ins and enums. thank you very much

Integer max value

2014-07-02 Thread pgtkda via Digitalmars-d-learn
Is there a way to get the max size of an integer?

Re: ~ ?

2014-06-26 Thread pgtkda via Digitalmars-d-learn
On Friday, 27 June 2014 at 06:33:07 UTC, Ali Çehreli wrote: On 06/26/2014 10:58 PM, pgtkda wrote: What does this symbol mean in relation to D? ~ It can be used in two ways: 1) When used as a unary operator, it means bitwise complement: assert(~0xaa55aa55 == 0x55aa55aa); 2) When used as

Re: Enum type deduction inside templates is not working

2014-06-26 Thread pgtkda via Digitalmars-d-learn
On Friday, 27 June 2014 at 06:21:11 UTC, Uranuz wrote: On Friday, 27 June 2014 at 06:14:48 UTC, pgtkda wrote: On Friday, 27 June 2014 at 06:12:57 UTC, pgtkda wrote: How I could make this working without explicit specifying of types? sorry, i should read better Ok. Maybe it was discussed alr

Re: Enum type deduction inside templates is not working

2014-06-26 Thread pgtkda via Digitalmars-d-learn
On Friday, 27 June 2014 at 06:12:57 UTC, pgtkda wrote: How I could make this working without explicit specifying of types? sorry, i should read better

Re: Enum type deduction inside templates is not working

2014-06-26 Thread pgtkda via Digitalmars-d-learn
On Friday, 27 June 2014 at 06:04:20 UTC, Uranuz wrote: Compiler can't deduce type for template struct Pair when using it with enum argument. There is an example import std.stdio; enum Category { first, second, third }; struct Pair(F, S) { F first; S second; t

~ ?

2014-06-26 Thread pgtkda via Digitalmars-d-learn
What does this symbol mean in relation to D? ~

Re: close program by code

2014-06-26 Thread pgtkda via Digitalmars-d-learn
On Thursday, 26 June 2014 at 09:58:50 UTC, FreeSlave wrote: On Thursday, 26 June 2014 at 09:05:23 UTC, pgtkda wrote: How can i close my application by code? Do you mean exit status? Just call exit function from C library. import std.c.stdlib; void main() { exit(0); } wow, thank you ver

close program by code

2014-06-26 Thread pgtkda via Digitalmars-d-learn
How can i close my application by code?