Yeah erico's time is what i called a frame skip method, easy to implement, but effective.
A more proper implementation (in my opinion) is to not always move 10 pixels, but smaller values, like mentioned before. But what i forgot is, that snake is a bit special, because you want it to be locked to your 10x10 grid. So you need some more modifications for this, like erico said, just move if its time for a new 10x10 block. Basically this could like like this (this time real code^^):
SETSCREEN 800,600,0
LIMITFPS 50
LOCAL xmax%=80, ymax%=60
// snake body:
LOCAL tailx%[], taily%[], tails%=9
// movement:
LOCAL speed=0.2, dirx=-speed, diry // speed must be >0 and <=1
// starting positions:
LOCAL headx=40,heady=30 // virtual head position
DIM tailx[tails+1]; DIM taily[tails+1]
FOR i%=0 TO tails
tailx[i]=headx+tails-i
taily[i]=heady
NEXT
// real head is always tail[-1]
// food position:
LOCAL foodx%=RND(xmax-1), foody%=RND(ymax-1)
REPEAT
//controls
IF KEY(208) // up
dirx=0
diry=speed
ELSEIF KEY(200) // down
dirx=0
diry=-speed
ENDIF
IF KEY(203) // left
dirx=-speed
diry=0
ELSEIF KEY(205) // right
dirx=speed
diry=0
ENDIF
// move virtual head
INC headx, dirx
INC heady, diry
IF headx<0
INC headx, xmax
ELSEIF headx>xmax
DEC headx, xmax
ENDIF
IF heady<0
INC heady, ymax
ELSEIF heady>ymax
DEC heady, ymax
ENDIF
// ok, we need real movement?
IF tailx[-1]<>INTEGER(headx) OR taily[-1]<>INTEGER(heady)
// check for collisons
IF FALSE // collisions with snake or bad object, include your own ones, im to lazy :P use INTEGER(headx) and INTEGER(heady)
// fail- > end
ELSEIF INTEGER(headx)=foodx AND INTEGER(heady)=foody // collision with good object -> bigger snake
foodx=RND(xmax-1)
foody=RND(ymax-1)
INC tails
ELSE // no collision
DIMDEL tailx[], 0
DIMDEL taily[], 0
ENDIF
DIMPUSH tailx[], headx
DIMPUSH taily[], heady
ENDIF
FOR i%=0 TO tails
DRAWRECT tailx[i]*10, taily[i]*10, 10,10, RGB(255,0,0)
PRINT i, tailx[i]*10, taily[i]*10
NEXT
DRAWRECT foodx*10, foody*10, 10,10, RGB(0,255,0)
SHOWSCREEN
UNTIL KEY(1)
END
Simple and without collision detection (besides food), but it should give you a good idea how to adjust speed etc. dont use speed values bigger than 1, or you will get gabs and other unexpected results. Of cause this is just one possible way to do it, out of thousands.