help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] DLD not working?


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] DLD not working?
Date: Mon, 12 Nov 2007 08:30:58 +0100
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)

DLD addLibrary: 'libc'.

!SystemDictionary methodsFor: 'c callouts'!
stringCompare: lhs with: rhs
    <cCall: 'strcmp' returning: #int args: #(#string #string)>
! !

Transcript print: (Smalltalk stringCompare: 'foo' with: 'bar'); cr.

Hum, nothing. I tried your example on PPC Mac OS X (2.3.6 and 2.95f), i386-linux (2.95f), x86_64-linux (2.95f), and it always worked. It printed 4 or 1 depending on the platform -- but it worked. I also tried

!String methodsFor: 'c callouts'!

strcmp: rhs
    <cCall: 'strcmp' returning: #int args: #(#self #string)>
! !

and it worked well too.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]