ShowMessage(
IntToStr(Sizeof(s)) //这里显示的结果是 4
+IntToStr(s) + IntToStr(@s[1]) //这里输出的 s的值和 s[1]的地址是一样的
'BORLAND'
'You''ll see'
''''
''
' '
S1 := #89#111#117;
S2 := 'You';
ShowMessage(S1 + #13#10 + S2);
end;
ShowMessage('This is very, very long message ' +
'that seems to go on and on forever. In order ' +
'to make the code more readable the message has ' +
'been split across several lines of code.');
S1 := 'Hello World';
if S1 = 'Hello World' then
ShowMessage('相等')
ShowMessage('不相等');
end;
S2 := Copy(S1, Length(S1), 1);
RS := RS + S2 + #13#10;
S2 := S1;
Delete(S2, 1, 1);
RS := RS + S2 + #13#10;
S2 := Format('Time is : %d:%d:%d', [12, 15, 40]);
RS := RS + S2 + #13#10;
X := 65535;
S2 := IntToStr(X);
RS := RS + S2 + #13#10;
X := Ord(S1[0]);
X := Length(S1);
RS := RS + IntToStr(X) + #13#10;
S2 := LowerCase(S1);
RS := RS + S2 + #13#10;
S2 := UpperCase(S1);
RS := RS + S2 + #13#10;
S2 := StringOfChar('A', 10);
RS := RS + S2 + #13#10;
S2 := StrPas(SP);
RS := RS + S2 + #13#10;
StrPCopy(SP, 'World Hello');
RS := RS + StrPas(SP) + #13#10;
S2 := #13#10' Hello World ';
S2 := Trim(S2);
RS := RS + S2 + #13#10;
S2 := 'AABBCC';
S2 := StringReplace(S2, 'A', 'E', [rfReplaceAll]);
RS := RS + S2 + #13#10;
ShowMessage(RS);
end;