> Timon Gehr:
> > I just noticed a little oddity.
>
> > Why does this code compile? The equivalent C code is rejected:
> I think Andrei wants (rightly) it to be fixed. So I think it is an
> implementation "bug" that will be fixed.
IIRC, TDPL says that the semicolon is required, even though it isn
> 1) T foo(T:SomeClass)(T arg){..}
> It is specified on the main page that this template will match against
> instantiations with a subclass of SomeClass. Will this also duplicate the
> code? Or will the template work similar to the function T foo(SomeClass
> arg){..}? If yes, why should normal fun
On 04/12/2011 11:51 PM, Steven Schveighoffer wrote:
On Tue, 12 Apr 2011 17:21:57 -0400, spir wrote:
On 04/12/2011 09:21 PM, Steven Schveighoffer wrote:
int main(){
int a,b;
do{
scanf("%d %d",&a,&b);
}while(ahttp://www.digitalmars.com/d/2.0/statement.html#DoStatement)
[...]
I think the gramma
On Tue, 12 Apr 2011 17:21:57 -0400, spir wrote:
On 04/12/2011 09:21 PM, Steven Schveighoffer wrote:
int main(){
int a,b;
do{
scanf("%d %d",&a,&b);
}while(aThe grammar specifies this correctly, but then again, the example uses
the
semicolon. (http://www.digitalmars.com/d
On 04/12/2011 09:21 PM, Steven Schveighoffer wrote:
int main(){
int a,b;
do{
scanf("%d %d",&a,&b);
}while(ahttp://www.digitalmars.com/d/2.0/statement.html#DoStatement)
[...]
I think the grammar should be changed...
yop!
This is almost as bad as go's
requirement for if sta
On 4/12/11, bearophile wrote:
> Template functions may not require a bang+types if argument
> types can be inferred from the given arguments.
So isn't the string literal a candidate in this case?
1) T foo(T:SomeClass)(T arg){..}
It is specified on the main page that this template will match against
instantiations with a subclass of SomeClass. Will this also duplicate the
code? Or will the template work similar to the function T foo(SomeClass
arg){..}? If yes, why should normal functions and
Andrej Mitrovic:
> I thought templated functions can be called without a bang if an
> argument can be deduced to be available at compile time. I know I've
> read about this somewhere, either TDPL or the docs. So I thought that
> writef checks the string literal at compile time, not runtime.
I thi
On Tue, 12 Apr 2011 14:57:26 -0400, Timon Gehr wrote:
I just noticed a little oddity.
Why does this code compile? The equivalent C code is rejected:
import std.stdio;
//#include
int main(){
int a,b;
do{
scanf("%d %d",&a,&b);
}while(aThe grammar specifies this correctly, b
Timon Gehr:
> I just noticed a little oddity.
> Why does this code compile? The equivalent C code is rejected:
I think Andrei wants (rightly) it to be fixed. So I think it is an
implementation "bug" that will be fixed.
Bye,
bearophile
I just noticed a little oddity.
Why does this code compile? The equivalent C code is rejected:
import std.stdio;
//#include
int main(){
int a,b;
do{
scanf("%d %d",&a,&b);
}while(ahttp://www.digitalmars.com/d/2.0/statement.html#DoStatement)
It's for Windows only.
On 12/04/2011 01:59, Steven Wawryk wrote:
On 12/04/11 07:36, Simon wrote:
On 11/04/2011 22:15, Stewart Gordon wrote:
On 11/04/2011 02:37, Jonathan M Davis wrote:
This is true for static "globals" and static members, but the C++
standard requires static locals (local to functions) to be init
I thought templated functions can be called without a bang if an
argument can be deduced to be available at compile time. I know I've
read about this somewhere, either TDPL or the docs. So I thought that
writef checks the string literal at compile time, not runtime.
Template shenanigans..
Hi,
can anyone tell me where to find implib. I am using mac OS X, but
bup.zip have just exe files, which are of no use. Is there a place where
I can find implib for mac or unix system?
Thanks for the help
Tine Å ukljan
>An array does not dynamically adjust its length when you assign an
>element, you have to assign the length explicitly before-hand. Some
>dynamic languages do this (like Javascript), but not D.
>
>You can achieve this with an associative array:
>
>Node*[int] pointers;
>
>However, iterating an AA d
/usr/bin/ld: Warning: size of symbol
`_D5table14__T5TableTkTkZ5Table7opApplyMFDFKkZiZi' changed from 96 in
/tmp/.rdmd/rdmd-table.d-403917940996C846133B5FCD56447466/table.o to 100 in
/tmp/.rdmd/rdmd-table.d-403917940996C846133B5FCD56447466/table.o
???
Note: this is just a warning, program runs
-Christian Manning wrote:
>Seems like Node*[] pointers needs to have a defined length before
>allocating to an index as adding "++pointers.length;" before
>"pointers[i]=n;" makes it work fine.
Thanks, it works...!
-Denis wrote:
>There is no node in pointers as of now, thus pointers[i] can only b
On Tue, 12 Apr 2011 08:20:20 -0400, Ishan Thilina
wrote:
I can compile the following code. But when I run the program it gives me
a
"core.exception.RangeError@untitled(34): Range violation
" error.
The code is as follows.
"
import std.stdio;
int main(char[][] args)
{
struct Node
On Mon, 11 Apr 2011 16:35:39 -0400, Andrej Mitrovic wrote:
There is a bug here:
import std.stdio;
void main()
{
int index;
writef("The index is", index);
}
Actually I found this bug in some example code:
http://d.puremagic.com/issues/show_bug.cgi?id=5836
writef is missing a forma
On 04/12/2011 02:20 PM, Ishan Thilina wrote:
I can compile the following code. But when I run the program it gives me a
"core.exception.RangeError@untitled(34): Range violation
" error.
The code is as follows.
"
import std.stdio;
int main(char[][] args)
{
struct Node{
On 12/04/2011 13:20, Ishan Thilina wrote:
I can compile the following code. But when I run the program it gives me a
"core.exception.RangeError@untitled(34): Range violation
" error.
The code is as follows.
"
import std.stdio;
int main(char[][] args)
{
struct Node{
int
I can compile the following code. But when I run the program it gives me a
"core.exception.RangeError@untitled(34): Range violation
" error.
The code is as follows.
"
import std.stdio;
int main(char[][] args)
{
struct Node{
int _value;
Node* _next,_prev,_
23 matches
Mail list logo