Do you want to wrap text?
set display mode 1360,768,32
sync on
sync rate 0
set text font "system",1
set text size 16
a$= "Euclid's Elements form one of the most beautiful and influential works of science in the history of humankind. Its beauty lies in its logical development of geometry and other branches of mathematics."
x= 100
y= 100
width= 50
do
inc width, rightkey()-leftkey()
ink -8,8
t= y
b= wrapText(a$,x,y,width)
l= x
r= x + text size()*width/2.2
line l,t,r,t
line r,t,r,b
line l,b,r,b
line l,t,l,b
print screen fps()
sync:cls
loop
end
`//
function wrapText(this$,x,y,width)
while len(this$) >width
for i= width to 0 step -1
if mid$(this$,i) =" " then exit
next i
if i =0
text x,y,left$(this$,width-1)+"-"
this$= right$(this$,len(this$)+1-width)
else
text x,y,left$(this$,i)
this$= right$(this$,len(this$)-i)
endif
inc y, text size()
endwhile
text x,y,this$
inc y, text size()
endfunction y
`//

Formerly OBese87.