uses System.SysUtils;
var
Text: string;
BoolValue1, BoolValue2: Boolean;
begin
Text := 'true';
BoolValue1 := StrToBool(Text);
//boolValue1 is True
//with default for invalid input
BoolValue2 := StrToBoolDef('yes', False);
//boolValue2 is False
WriteLn('boolValue1 is ', BoolValue1);
WriteLn('boolValue2 is ', BoolValue2);
end.