Re: TStringGrid



On 9 Apr 2005 23:03:37 -0700, alanglloyd@xxxxxxx wrote:

<snip>

>procedure WriteStreamStr(Stream : TStream; Str : string);
>{writes a string to the stream}
>var
> StrLen : integer;
>begin
> {get length of string}
> StrLen := Length(Str);
> {write length of string}
> Stream.WriteBuffer(StrLen, SizeOf(Integer));
> {write characters}
> Stream.Write(Str[1], StrLen);

Alan,
I'm curious that you use both Stream.Write and Stream.WriteBuffer
- is there a particular reason ?

(Curiousity - not criticism)
.



Relevant Pages

  • Streams
    ... It seems that allocating a buffer for a stream to read to and and write from ... is a bit strange. ... stable that the latter if the string is null since a null string causes a ...
    (borland.public.delphi.language.objectpascal)
  • Re: help me build a combo
    ... curiousity I plugged my Washburn 5 string into the mixer and ran it clean ... I didn't notice any rolloff on the B string. ... check out the following sound clip. ... an octave up from that. ...
    (alt.guitar.bass)
  • Re: help me build a combo
    ... curiousity I plugged my Washburn 5 string into the mixer and ran it clean ... I didn't notice any rolloff on the B string. ... check out the following sound clip. ... harmonic frequencies. ...
    (alt.guitar.bass)
  • Re: What is the best way to do this in Delphi?
    ... record will consist of a String and an array of integers. ... strings" to write in the file (consisting of a 4-byte integer followed ... Stream: TFileStream; ...
    (alt.comp.lang.borland-delphi)
  • Bug found in TstringList
    ... TStringList tries to split up the string that it loaded into multiple ... procedure TStrings.LoadFromStream(Stream: TStream); ... Stream: TStream; ...
    (alt.comp.lang.borland-delphi)