{++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ function to convert a string of maximum length = 255 to all lower case letters, and return the converted string. Corresponds to the BASIC command LCASE$() Requires pascal/z's external functions, length. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++} FUNCTION LCASE(X:MSTRING): DSTRING; CONST OFFSET = 32; VAR ch : char; I, LEN : 0..255; temp : DSTRING; BEGIN LEN:=LENGTH(X); { setup with length of local string equal to length of } { string to be converted. } setlength(temp,len); IF ( LEN=0 ) THEN {EXIT} ELSE BEGIN FOR I:=1 TO LEN DO BEGIN ch := X[i]; { if char is upper case then make lower case. } IF ( 'A'<=ch ) and ( ch<='Z' ) THEN temp[i] := chr( ord(ch) + Offset ) else { store as is } temp[i] := ch; END{FOR}; END{ELSE}; LCASE := temp; END;