Got an idea for enhancing PureBasic? New command(s) you'd like to see?
IceSoft
Addict
Posts: 1685 Joined: Thu Jun 24, 2004 8:51 am
Location: Germany
Post
by IceSoft » Fri May 05, 2006 8:45 am
Missing a solution to change 'temporary' the pointer value:
I get a syntax error message with this one:
@Fred,
Please let it working (it is very important for using pointers)
Or give me the correct syntax
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Psychophanta
Always Here
Posts: 5153 Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:
Post
by Psychophanta » Fri May 05, 2006 9:10 am
Ther are many solutions. This one could help, i hope:
Code: Select all
*p.struc
*temp.struc=*p+SizeOf(struc)*1
*temp\v
IceSoft
Addict
Posts: 1685 Joined: Thu Jun 24, 2004 8:51 am
Location: Germany
Post
by IceSoft » Fri May 05, 2006 9:13 am
Psychophanta wrote: Ther are many solutions. This one could help, i hope:
Code: Select all
*p.struc
*temp.struc=*p+SizeOf(struc)*1
*temp\v
Sorry, that is not a solution!
That's only a workaround.
A solution don't need a second variable!
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
freak
PureBasic Team
Posts: 5940 Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany
Post
by freak » Fri May 05, 2006 9:36 am
PB is not C...
quidquid Latine dictum sit altum videtur
Fred
Administrator
Posts: 18162 Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:
Post
by Fred » Fri May 05, 2006 9:38 am
It's not a bug, please post in the appropriate section.
Psychophanta
Always Here
Posts: 5153 Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:
Post
by Psychophanta » Fri May 05, 2006 9:39 am
freak wrote: PB is not C...
Of course
PB is much more complex than C if the user wants, and much more easy than C if the user wants. That's the power.
Psychophanta
Always Here
Posts: 5153 Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:
Post
by Psychophanta » Fri May 05, 2006 9:42 am
Fred wrote: It's not a bug, please post in the appropriate section.
Fred , are you awake??? did you drink yesterday?
This is in request section!
Fred
Administrator
Posts: 18162 Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:
Post
by Fred » Fri May 05, 2006 9:43 am
Because i just moved it
.
Psychophanta
Always Here
Posts: 5153 Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:
Post
by Psychophanta » Fri May 05, 2006 9:44 am
Fred wrote: Because i just moved it
.
IceSoft
Addict
Posts: 1685 Joined: Thu Jun 24, 2004 8:51 am
Location: Germany
Post
by IceSoft » Fri May 05, 2006 9:47 am
But this is a bottleneck.
@Fred,
I hope you add this very early.
Maybe it works if you change the syntax check only?
or
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
freak
PureBasic Team
Posts: 5940 Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany
Post
by freak » Fri May 05, 2006 10:06 am
Code: Select all
PeekB(*p+1) ; Or use whatever type you have there
quidquid Latine dictum sit altum videtur
IceSoft
Addict
Posts: 1685 Joined: Thu Jun 24, 2004 8:51 am
Location: Germany
Post
by IceSoft » Fri May 05, 2006 10:09 am
freak wrote: Code: Select all
PeekB(*p+1) ; Or use whatever type you have there
Ok, one more workaround.
It is not so fast as a directly pointer access is.
I hope the PB-Team adds this feature on the first 'PB Servicepack 1'.
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Fred
Administrator
Posts: 18162 Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:
Post
by Fred » Fri May 05, 2006 10:11 am
As fr34k says, it's not C, and we don't plan to introduce a weird syntax for this kind of stuff.
IceSoft
Addict
Posts: 1685 Joined: Thu Jun 24, 2004 8:51 am
Location: Germany
Post
by IceSoft » Fri May 05, 2006 10:16 am
Fred wrote: As fr34k says, it's not C, and we don't plan to introduce a weird syntax for this kind of stuff.
Come one @fred,
It is not weird. It is fast
Look this is not weird:
But you say this is weird (I using another sytax here)
Why?
Last edited by
IceSoft on Fri May 05, 2006 10:18 am, edited 1 time in total.
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Fred
Administrator
Posts: 18162 Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:
Post
by Fred » Fri May 05, 2006 10:17 am
Because '1' isn't a variable so you can't acces its field
. If it's only a speed matter, we can still put PeekX() in the compiler it self to avoid an extra call..