Number before the REPL indicator

Greetings to all,

Just recently I have started to explore versions 10.0+ and 10.1+ of SWI-Prolog
and I would like to ask about the integer number that appears before the indicator in the REPL:

1) What does it mean? I noticed that it does not always start with the same number…

2) What is its purpose? Does it show useful information for the programmer? Some examples would be nice…

3) Can the REPL indicator be modified like the prompt in Bash? How and what would be the purpose of that?

I will appreciate any insights about this. I’d like to clear details with my students.

Thanks in advance.

See SWI-Prolog -- Command line history

At some point (relatively recent) during the new GUI top level development this was enabled by default. The number is just a query number. It appears start at 101 at SWIP launch time. Some number of commands from a previous session are preserved with numbers lower than 101.

I think it’s fairly intuitive but you should be able to do your own experiments to answer any detailed questions.