REM https://github.com/Eva-Broccoli/OPL-Rosetta-Code/blob/main/Arraylen.opl PROC main: LOCAL array$(2,6),i% ONERR errhand array${1}="apple" array${2}="orange" i%=1 WHILE 1 IF array$(i%)<>"" i%=i%+1 ENDIF ENDWH errhand:: ONERR OFF PRINT "Array length is",i%-1 GET ENDP