adxpid returns the number of the current Safe process.
# Creation of a 'single' sequential file
Local Integer NO_P
[L]NO_P = adxpid
Openo filpath('TXT', [L]FICH+num$([L]NO_P), '', 0)
adxpid returns the process number of the current Safe process.
Warning: when in a client-server mode, nothing can guarantee that this process number does not exist on another machine (server or client).
On the other hand, the processes are numbered sequentially in their order of appearance since the boot (operating system start). Likewise, when a set limit is reached (depending on the operating system), the numbering base is reset to zero. These two mechanisms explain why the number given to a long completed process can be assigned to another process.
The result is of Integer type.