Here's a simple solution:
ACLS 'SETUP RESTORE @POINTS READ NUMBER DIM POINTS_XY[NUMBER*2] FOR I=0 TO NUMBER*2-1 READ POINTS_XY[I] NEXT 'OUTPUT ?MIN_STEPS(POINTS_XY) 'FUNCTION DEF MIN_STEPS(ARRAY_XY) VAR I,STEPS,LENGTH=LEN(ARRAY_XY)/2-1 FOR I=0 TO LENGTH-1 VAR DIST_X=ABS(ARRAY_XY[I*2 ]-ARRAY_XY[I*2+2]) VAR DIST_Y=ABS(ARRAY_XY[I*2+1]-ARRAY_XY[I*2+3]) INC STEPS,MAX(DIST_X,DIST_Y) NEXT RETURN STEPS END 'INPUT @POINTS DATA 3 'NUMBER OF POINTS DATA 0,0 DATA 1,1 DATA 1,2