Just starting out? Need help? Post your questions and find answers here.
willib
User
Posts: 39 Joined: Mon Sep 15, 2003 7:04 pm
Location: Bielefeld
Post
by willib » Sat Feb 12, 2005 11:53 pm
Hi Pure freaks
I want to change the Data of a string like
change stringposition 6 o "Z"
the only way I see is to code
Code: Select all
a.s="1234567890"
a.s=Left(a.s,5)+"Z"+Right(a.s,4)
Debug a"
isn`t here an easier way to do this , maybe with poke ?!?
Best regards.
Willib
traumatic
PureBasic Expert
Posts: 1661 Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:
Post
by traumatic » Sun Feb 13, 2005 12:07 am
willib wrote: maybe with poke ?!?
like PokeB(@a+5, 'Z') ?
Can't see a use in this though
Good programmers don't comment their code. It was hard to write, should be hard to read.
blueznl
PureBasic Expert
Posts: 6166 Joined: Sat May 17, 2003 11:31 am
Contact:
Post
by blueznl » Sun Feb 13, 2005 12:14 am
a.s="1234567890"
PokeB(@a+5,'Z')
Debug a
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide
right here ... )
blueznl
PureBasic Expert
Posts: 6166 Joined: Sat May 17, 2003 11:31 am
Contact:
Post
by blueznl » Sun Feb 13, 2005 12:15 am
darn traumatic was faster...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide
right here ... )
willib
User
Posts: 39 Joined: Mon Sep 15, 2003 7:04 pm
Location: Bielefeld
Post
by willib » Sun Feb 13, 2005 12:27 am
Many thanks
Is it sure that a string is always successively in Storage.
ore are there any restrictions ?
best regards
Willib
blueznl
PureBasic Expert
Posts: 6166 Joined: Sat May 17, 2003 11:31 am
Contact:
Post
by blueznl » Sun Feb 13, 2005 11:03 am
yes
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide
right here ... )
thefool
Always Here
Posts: 5875 Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark
Post
by thefool » Sun Feb 13, 2005 11:14 am
but if you poke outside the string your program may crash or something else will happen.. [dont worry 'bout your windows, as the program memory space is protected.. to poke outside your program you need some api commands..]
eevee
User
Posts: 69 Joined: Sat Jan 08, 2005 6:24 pm
Location: UK
Post
by eevee » Sun Feb 13, 2005 7:27 pm
Where were you lot when I needed you?????????
viewtopic.php?t=13810
Regards,
Ernest
traumatic
PureBasic Expert
Posts: 1661 Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:
Post
by traumatic » Sun Feb 13, 2005 8:04 pm
eevee wrote: Where were you lot when I needed you?????????
huh?
Good programmers don't comment their code. It was hard to write, should be hard to read.
blueznl
PureBasic Expert
Posts: 6166 Joined: Sat May 17, 2003 11:31 am
Contact:
Post
by blueznl » Sun Feb 13, 2005 9:04 pm
it's all in asking the *right* question
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide
right here ... )
eevee
User
Posts: 69 Joined: Sat Jan 08, 2005 6:24 pm
Location: UK
Post
by eevee » Sun Feb 13, 2005 9:15 pm
Or perhaps in the right board??????????
Regards,
Ernest