Recent

Author Topic: RawByteString Questions  (Read 3276 times)

Remy Lebeau

  • Hero Member
  • *****
  • Posts: 1590
    • Lebeau Software
Re: RawByteString Questions
« Reply #15 on: August 22, 2022, 08:27:13 pm »
The short answer is:

   Because I'm posting on the beginners board.

Beginners shouldn't even be touching RawByteString without first fully understanding what is really is, what it does, and what it is meant for.  Just stick with the normal String type for everything, don't use specialized string types except when you absolutely need to (and this is not one of those situations).
Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) - Admin, Developer (Support forum)

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: RawByteString Questions
« Reply #16 on: August 22, 2022, 09:05:55 pm »
Well thanks for the advice.
 
However, beginners need to try things to learn how they work. What about an integer or boolean. if the same applies beginners need to read the 3,000+ pages of documentation on Free Pascal before they code 'Hello World'. And if that's the way it should work there will be two Free Pascal coders.

You and the guy who wrote the compiler.

Or there are people like me who try things all the time, get in a big mess and post on this board. Where someone usually answers my questions, suggest a better way or even writes a bit code.

And if that isn't the way it's suppose to work I would be writing Basic.

Note: I'm 79 years old with very poor eye sight. I work on two 55' monitors and use the mouse magnifier button to write or read anything.  The program I'm writing is 4,000+ lines long. And with all that it's only taken a year and a few months. Maybe I'll finish before...


« Last Edit: August 22, 2022, 09:07:36 pm by JLWest »
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

Bart

  • Hero Member
  • *****
  • Posts: 5716
    • Bart en Mariska's Webstek
Re: RawByteString Questions
« Reply #17 on: August 22, 2022, 10:05:30 pm »
Please, just keep on doing as you do.
We'll answer questions, even when we might be a little harsh.

Hope you'll keep on having fun coding in Pascal (not in BASIC).

Bart

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: RawByteString Questions
« Reply #18 on: August 22, 2022, 10:52:25 pm »
Hi Bart I will. I have over 1000 post I'm told. Only two times was anyone a little harsh.

Thanks
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

Remy Lebeau

  • Hero Member
  • *****
  • Posts: 1590
    • Lebeau Software
Re: RawByteString Questions
« Reply #19 on: August 23, 2022, 03:26:41 am »
Or there are people like me who try things all the time, get in a big mess and post on this board. Where someone usually answers my questions, suggest a better way or even writes a bit code.

Which is exactly what I did - I suggest you don't use RawByteString unless you absolutely need it.  And interfacing with the Clipboard and TStringList do not need the use of RawByteString, as paweld demonstrated.
Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) - Admin, Developer (Support forum)

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: RawByteString Questions
« Reply #20 on: August 23, 2022, 05:52:30 am »
@Remy
I removed the RawByteString:

Probably have committed other coding sins worse than that.

But thanks
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

PascalDragon

  • Hero Member
  • *****
  • Posts: 6395
  • Compiler Developer
Re: RawByteString Questions
« Reply #21 on: August 23, 2022, 09:13:00 am »
Probably have committed other coding sins worse than that.

A “coding sin” is different from simply using the wrong thing. The former is something one can argue about the later is simply wrong (e.g. if you'd use the register calling convention to import WinAPI functions).

alpine

  • Hero Member
  • *****
  • Posts: 1412
Re: RawByteString Questions
« Reply #22 on: August 23, 2022, 09:21:27 am »
@Remy
I removed the RawByteString:

Probably have committed other coding sins worse than that.

But thanks
I don't consider myself a beginner (my Pascal experience starts with TurboPascal 3.0) but I was also confused about the purpose of RawByteString. Thought it is a simply a type without codepage conversions, but it turns out that it is something different. See https://forum.lazarus.freepascal.org/index.php/topic,59958.msg447745.html#msg447745
 
IMO the problem is partly due to the insufficient documentation of FPC/Lazarus. And people who are deeply immersed in the implementation of get a little nervous to explain the same thing over and over again. It's explicable and I can accept it.

I hope in the link you'll find the reason why RawByteString isn't the right type. There are more details latter in that thread if you're interested.   

And keep on doing it, we'll help as we can
"I'm sorry Dave, I'm afraid I can't do that."
—HAL 9000

 

TinyPortal © 2005-2018