a$="1234567890"

print hallo$(a$,4)
print hallo$(a$,3,7)


sub hallo$(a$,f,t)
	if (numparams=2) then	
		return mid$(a$,f)			
	beep	
	else	
		return mid$(a$,f,t-f+1)		
		bell		
	endif
	print numparams
end sub