### Bug: String Slicing (*solved*)

(fails with or without the DIM statements, but crashes differently in each case)

- Code:
`DIM A$,p$ as string`

DIM start,fin as integer

10 LET a$="This is a very long scrolly string that I am going to print"

20 LET start=1

30 LET fin=32

40 LET p$=a$(start TO fin)

50 LET start=start+1

60 LET fin=fin+1

70 IF fin>LEN a$ THEN LET fin=1 : END IF

80 IF start>LEN a$ THEN LET start=1 : END IF

90 PRINT AT 0,0;p$

100 IF start<fin THEN GO TO 40 : END IF

110 LET p$=a$(start TO )+a$( TO fin)

120 GO TO 50

Correcting the 1 to Zero (Since in compiled code the strings begin slicing at zero) has no effect other than change the way it crashes:

- Code:
`DIM A$,p$ as string`

DIM start,fin as integer

10 LET a$="This is a very long scrolly string that I am going to print"

20 LET start=0

30 LET fin=31

40 LET p$=a$(start TO fin)

50 LET start=start+1

60 LET fin=fin+1

70 IF fin>LEN a$ THEN LET fin=0 : END IF

80 IF start>LEN a$ THEN LET start=0 : END IF

90 PRINT AT 0,0;p$

100 IF start<fin THEN GO TO 40 : END IF

110 LET p$=a$(start TO )+a$( TO fin)

120 GO TO 50