Literal Strings should be ReadOnly

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
PMV
Enthusiast
Enthusiast
Posts: 727
Joined: Sat Feb 24, 2007 3:15 pm
Location: Germany

Literal Strings should be ReadOnly

Post by PMV »

Code: Select all

Define *p = @"Test" 

Debug "Test" 
PokeS(*p, "stop" ,4) 
a.s = "Test" 
Debug a
This shouldn't be possible. Please don't discuss this as a bug, it isn't. But
it would be realy nice if the compiler or debugger would also show a
errormessage.

http://www.purebasic.fr/german/viewtopi ... sc&start=0
freak wrote:Ich werde Fred mal bei Gelegenheit darauf hinweisen. Wenn ihr aber sichergehen wollt das es nicht in Vergessenheit gerät dann schreibt besser noch einen freundlichen Post ins englische Feature Request forum. ;-)
I hope this was friendly enough :mrgreen:

MFG PMV
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

you should alter the title:
this is not a static string but a constant string, additionally it's literal,
so the correct term is literal constant string.
oh... and have a nice day.
PMV
Enthusiast
Enthusiast
Posts: 727
Joined: Sat Feb 24, 2007 3:15 pm
Location: Germany

Post by PMV »

I and my english ... :oops:
But there was someone faster :shock:
Great, so i need not to do it :lol:

MFG PMV
Post Reply