I see this all the time. Every C programmer has once forgotten that "MyPath\Here" will blow up if H is changed to t. Just wait until you want to match a double \ in a regular expression specified in C. That would be something like Match("\\\\\\\"). Escape characters simply cause problems.pdwyer wrote:Personally, I'm not a fan of escape characters in strings. I often see problems with ansi C programs (often connecting from unix) connecting to windows servers and things like domain\username authentication fails, then they manually hardcode a domain\\username into their conf files to deal with this some other catch spits the dummy in their code.
It might be convenient for a programmer to type a little less but I think that the time is sometimes lost with interest due to issues later and support time. I have no evidence that this happens a lot but I see it sometimes from the sysadmin side and so I'd not use it in my code if it were available
purebasic vs. freebasic
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
you misunderstood me. I was just pointing out, that I have no need for escaped strings, because I'm used to roundscribe it via Chr().moogle wrote:I was referring to the attitude of "I've been using this for years I wouldn't want to do it an easier or better way".
actually, I got quickly into it in C to use "\n" e.g.
so, I' not strictly against the use of escaping.
but Paul has mentioned a good point what problems escaping could cause... (edit: and Trond fastened it)
could we agree that escaping stings are a latter problem for PB?
I would like to see things like full DX9 access and better 3D engine as higher priority....
oh... and have a nice day.
Yes we can, it's true php doesn't handle filepaths alot so I never came across thisKaeru Gaman wrote:could we agree that escaping stings are a latter problem for PB?
I would like to see things like full DX9 access and better 3D engine as higher priority....

But at least discussing it has led others to show me some good ways to bypass it.
cheers.

- Fluid Byte
- Addict
- Posts: 2336
- Joined: Fri Jul 21, 2006 4:41 am
- Location: Berlin, Germany
And let's also agree that PB is not in the "dark ages of programming". 

Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
What I'd like to see is automatic string concatenation for literals:(So no need for +.)
PS! What I've seen of FreeBasic code generation was fast but buggy (huge memory leak).
Code: Select all
"Constant" #LF
PS! What I've seen of FreeBasic code generation was fast but buggy (huge memory leak).
Speaking of dark ages
Is there a good guide on how to use COM with PB? Is it easy to do or is it fairly painful not having variants built in?

Is there a good guide on how to use COM with PB? Is it easy to do or is it fairly painful not having variants built in?
Paul Dwyer
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
If you would like another head to bounce ideas off of, I would like to get into COM in PB as well.pdwyer wrote:Speaking of dark ages![]()
Is there a good guide on how to use COM with PB? Is it easy to do or is it fairly painful not having variants built in?
Here are some references I've accumulated in the past:
http://www.purebasic.fr/english/viewtopic.php?t=22132
http://www.purebasic.fr/english/viewtopic.php?t=15755
http://www.purebasic.fr/english/viewtopic.php?t=26880