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
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk