>Ok , well using string[255] worked fin. I think mor original problem was
>that I was not putting a "@" at the begining of what was to be written to
>the socket in buffer form. i.e.
...
>I am not sure if I this still works but just using a string rather than a
>fixed length string, but I will know tonight when I get home I guess.


The answer is no it shouldn't.

here are 2 record definitions

type
TA = record
  X,Y :Integer;
  N :String;
end;

TB = record
  X,Y :Integer;
  N :String[8];
end;

var
  A :TA;
  B :TB;

Size of A remains fixed as does Size Of B. But A is smaller because the string isn't 
actually in there.
Memory for TA would be something like XXXXYYYYNNNN whereas TB will be XXXXYYYYNNNNNNNN

note that if you store 'PASSWORD' in the N fields of both records you will still have 
those record sizes
because in TA the string is stored outside the record in a different part of memory 
and the N field is just
a pointer to the text. SO using @A will send the pointer not the text, whereas @B will 
send the text.

I'm afraid you'll have to do a bit more work to transmit variable length strings than 
that.

--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to