Primes by Trial Division - HP BASIC/V

10 February 2019
HP BASIC/V is structurally the same as IBM PC BASIC; differences are single-character variable names, implicit GOTO after THEN, and array indices are 1-based instead of 0-based.
Square brackets are used for array subscripts, but parentheses are accepted for input and converted.
1 GOTO 10
5 C=C+1
6 GOTO 50
10 DIM P[1000]
20 P[1]=2
25 PRINT P[1]
30 C=3
40 FOR F=2 TO 1000
50 FOR I=1 TO (F-1)
60 IF (C MOD P[I])=0 THEN 5
70 NEXT I
80 PRINT C
90 P[F]=C
100 C=C+1
110 NEXT F
120 END