Function Left$( str$,n )?

BlitzMax Forums/BlitzMax Beginners Area/Function Left$( str$,n )?

sss,
I understand that,but my code wasn't working so I reduced left down to basics to make sure my len(text)-1 command wasn't causing my problems.Thanks though.
Is the commands text.length and text.high and such documented?If so where at?I have trail version.

And I have another problem with same code.If I type letters all the way across the screen and use backspace to erase them,by first holding down a letter,then holding down the backspace,after doing this for about 5 or six times,I recieve the error.

unhandled exception:Attempt to index array element beyond length.



I've tried limitting my length like this.
Graphics 800,600
Global text:String
Global a:Int

Repeat
a=GetChar()
If a 
	If text.length<10 text:+Chr(a)
EndIf
If KeyDown(key_backspace)
	 text=Left(text,text.length-1)  
EndIf
DrawText text,100,100
Flip
Cls
Until KeyDown(key_escape)


still does it.The blue highlight is on Cls.

Thanks
mudcat