Did you know ... Search Documentation:
PL_current_prolog_flag()