March 18, 2004
In article <c3cub9$1fbg$1@digitaldaemon.com>, imr1984 says...
>
>hmm strange, what was the command line for dmd?
>
>In article <c3cs9k$1brk$1@digitaldaemon.com>, Carlos Santander B. says...
>>
>>That's weird. Try this:
>>
>>interface A {}
>>class B : A {}
>>void foo (A a) { assert ( (cast(B) a) !== null ) ; }
>>void main() { foo(new B); }
>>
>>Using DMD 0.81 on Win98 I get: "Error: AssertError Failure inter.d(3)".
>>
>>-------------------
>>Carlos Santander B.
>
>

dmd inter
Where the contents of inter.d are those 4 lines above.

-------------------
Carlos Santander B.
March 18, 2004
On Thu, 18 Mar 2004 19:58:35 +0000 (UTC) (19/Mar/04 06:58:35 AM)
, Carlos Santander B. <Carlos_member@pathlink.com> wrote:

> In article <c3cub9$1fbg$1@digitaldaemon.com>, imr1984 says...
>>
>> hmm strange, what was the command line for dmd?
>>
>> In article <c3cs9k$1brk$1@digitaldaemon.com>, Carlos Santander B. says...
>>>
>>> That's weird. Try this:
>>>
>>> interface A {}
>>> class B : A {}
>>> void foo (A a) { assert ( (cast(B) a) !== null ) ; }
>>> void main() { foo(new B); }
>>>
>>> Using DMD 0.81 on Win98 I get: "Error: AssertError Failure inter.d(3)".
>>>
>>> -------------------
>>> Carlos Santander B.
>>
>>
>
> dmd inter
> Where the contents of inter.d are those 4 lines above.
>
> -------------------
> Carlos Santander B.

Confirmed.


 C:\dparnell>type inter.d
 interface A {}
 class B : A {}
 void foo (A a) { assert ( (cast(B) a) !== null ) ; }
 void main() { foo(new B); }
 C:\dparnell>dmd inter.d
 C:\DPARNELL\DMD\BIN\..\..\dm\bin\link.exe inter,,,user32+kernel32/noi;

 C:\dparnell>inter
 Error: AssertError Failure inter.d(3)

 C:\dparnell>

-- 
Derek
March 18, 2004
Juan C wrote:
> assert should not be built into the language, each developer should be able to
> easily define own.
> 
> On the other hand I never use assert anyway.

If you don't use it, then why do you care whether it's built into the language or not?

I think assert could be improved, but I'd like it to still be built into the language. (I do use assert though not as often as I should.)

> In article <pan.2004.03.17.14.53.25.668012@yahoo.ca>, Ant says...
> 
>>On Wed, 17 Mar 2004 13:51:33 +0000, imr1984 wrote:
[...]

-- 
Justin
http://jcc_7.tripod.com/d/
March 19, 2004
"imr1984" <imr1984_member@pathlink.com> wrote in message news:c39l55$1rgg$1@digitaldaemon.com...
> the messages that assert throw are so undescriptive, that they are quite useless. I need them to tell me the file and line number the assert number
was
> thrown, otherwise i have to track through my large project looking for the particular assert that threw up on me :-[

It already does:

-----------------------------------
C:\cbx\mars>type test.d

void main()
{
        assert(0);
}

C:\cbx\mars>dmd test
\dm\bin\link test,,,user32+kernel32/noi;

C:\cbx\mars>test
Error: AssertError Failure test.d(4)

C:\cbx\mars>
------------------------------------------


March 20, 2004
well it doesnt for me :(
Im using DMD 0.81 on XP

In article <c3dgv8$2gfr$1@digitaldaemon.com>, Walter says...
>
>
>"imr1984" <imr1984_member@pathlink.com> wrote in message news:c39l55$1rgg$1@digitaldaemon.com...
>> the messages that assert throw are so undescriptive, that they are quite useless. I need them to tell me the file and line number the assert number
>was
>> thrown, otherwise i have to track through my large project looking for the particular assert that threw up on me :-[
>
>It already does:
>
>-----------------------------------
>C:\cbx\mars>type test.d
>
>void main()
>{
>        assert(0);
>}
>
>C:\cbx\mars>dmd test
>\dm\bin\link test,,,user32+kernel32/noi;
>
>C:\cbx\mars>test
>Error: AssertError Failure test.d(4)
>
>C:\cbx\mars>
>------------------------------------------
>
>


March 20, 2004
Works for me, DMD 0.81 on WinXP(Home)...

-C. Sauls
-Invironz

imr1984 wrote:
> well it doesnt for me :(
> Im using DMD 0.81 on XP
March 20, 2004
On Sat, 20 Mar 2004 12:52:22 +0000 (UTC), imr1984 <imr1984_member@pathlink.com> wrote:

> well it doesnt for me :(
> Im using DMD 0.81 on XP
>

That's too bad...Maybe something wrong with the way you set up your system.
I'm using DMD 0.81 on XP and it works just fine.

F:\>ver

Microsoft Windows XP [Version 5.1.2600]

F:\>ren inpchar.d test.d

F:\>type test.d
void main()
{
        assert(0);
}

F:\>dmd test
F:\dmd\bin\..\..\dm\bin\link.exe test,,,user32+kernel32/noi;

F:\>test
Error: AssertError Failure test.d(3)

F:\>
1 2
Next ›   Last »