Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Name Length in Binary
#5
Most any language that can perform file I/O can create null-terminated strings. :wink: I prefer string size headers myself, since you can define the length then grab the whole string at once instead of this "one byte at a time" stuff. What Robin said, though, would be the easiest approach. Though, why is there so many fixed length strings anyways? I can't really see it being for performance with so many string functions used like Trim$(), Left$(), Right$() and Mid$(), and it just ends up taking more RAM unless you actually use the defined length every time (which I doubt). I have never had problems with binary file I/O in VB6 with variable-length strings when just using:

Put #x,, MyTypeWithMyString

or

Put #x,, MyString
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)