Retro Rocket OS
BASIC-Powered Operating System
Loading...
Searching...
No Matches
GETPROCCOUNT Function
GETPROCCOUNT

Returns the number of processes currently running in the system. This includes both user programs and background tasks managed by Retro Rocket OS.


Examples

REM Print number of active processes
PRINT "Running processes: "; GETPROCCOUNT
REM Use process count in a conditional
IF GETPROCCOUNT > 10 THEN
PRINT "System busy"
ELSE
PRINT "System idle"
ENDIF
REM Example: wait until background process finishes
start_count = GETPROCCOUNT
REPEAT
PROCdoSomething
UNTIL GETPROCCOUNT = start_count
PRINT "Background job ended"

Notes

  • The returned value is an integer ≥ 1 (the current program itself counts as a process).
  • Values change dynamically as processes are created or end.
  • Designed for diagnostic or monitoring use; it does not reveal details of which processes are running — only the total count.
  • Use together with GETPROCNAME$ Function$ "GETPROCNAME\$" or GETPROCID to identify individual processes.

See also: GETPROCNAME$ Function$ "GETPROCNAME\$" · GETPROCID · KILL