Hi,

In practice it is the equivalent, since the ffiCall has a return type and it takes precedence over the ^ of Pharo.
Personally, I often add the ^ to ffiCalls that have a return to easy the reading, but the output will be the same.

Esteban

On May 10 2021, at 2:12 pm, Toma�� Turk <tomaz.turk@ef.uni-lj.si> wrote:
Dear all,

Should the method that calls Object>>#ffiCall: and variants always return the result of this call? For instance, in uFFI book, there is a method abs: defined as

FFITutorial class >> abs: n [
    ^ self ffiCall: #( int abs (int n) )
]

on page 16, however

FFITutorial >> abs: n [
    self ffiCall: #( int abs (int n) )
]

on page 52 doesn't have an explicit return ^. The book, however, in most of the examples uses the explicit return. What is the recommended approach? 

Thanks,
Tomaz