The %pclose() function closes the stream designated by stream opened by a %popen() and returns the exit status of the command.
var = %pclose((char*)stream)
%popen() function, FlashBASIC C functions overview, cfunction statement