30.08.2011, 19:47
Sorry, I disagree with you. Because, in the Pascal format has no arguments to the variable in the. ... Below is an example
If you think about. then we get a variable is needed to define the format for future use ...
Or am I wrong?
PHP код:
var
text : string;
begin
// Just 1 data item
ShowMessage(Format('%s', ['Hello']));
// A mix of literal text and a data item
ShowMessage(Format('String = %s', ['Hello']));
ShowMessage('');
// Examples of each of the data types
ShowMessage(Format('Decimal = %d', [-123]));
ShowMessage(Format('Exponent = %e', [12345.678]));
ShowMessage(Format('Fixed = %f', [12345.678]));
ShowMessage(Format('General = %g', [12345.678]));
ShowMessage(Format('Number = %n', [12345.678]));
ShowMessage(Format('Money = %m', [12345.678]));
ShowMessage(Format('Pointer = %p', [addr(text)]));
ShowMessage(Format('String = %s', ['Hello']));
ShowMessage(Format('Unsigned decimal = %u', [123]));
ShowMessage(Format('Hexadecimal = %x', [140]));
end;
Or am I wrong?