SRL Archive - General

Characters!


renegadeandy

2006-06-29 19:06:47

Hi!

Ok so this is what i need to do in scar.

I have a word "test"

and the following code:

textlen:=Length(text) ;

writeln ('The wordlength is : '+IntToStr(textlen));

This prints out "The wordlength is 4". Perfect - that works.

What i want to do now however - is to find out what say - the 3rd letter in the word is. and then print that out. I cannot see for the life of me which function i need to use.

Please help!

Thanks

Andy

WT-Fakawi

2006-06-29 19:16:00

function copy(s: string; ifrom, icount: Longint): string; - returns part of the string (Copy('abcde',2,3) would return 'bcd'.

renegadeandy

2006-06-29 19:49:27

ok - what an odd way to do it :S! Why no proper string functions in Scar?!

Thanks for the help - i got it sorted now.