Search found 27 matches

by iNX
Tue Jun 17, 2008 11:25 pm
Forum: Off Topic
Topic: Euro 2008 - footie zone!
Replies: 120
Views: 24739

blueznl wrote:Next.
In case we had some doubts (we as italian, i mean) we must thank Van Basten and all Netherlands players'
They did play.. without any doubts. And i don't mean that they would have lost deliberately, but they could surely have been less motivated than Romania.
by iNX
Sat Apr 26, 2008 4:21 pm
Forum: Coding Questions
Topic: Delete file on next startup
Replies: 7
Views: 3354

if you're familiar with windows API, you could use moveFileEx that does exactly what you need, with a single call.

BOOL MoveFileEx(
LPCTSTR lpExistingFileName,
LPCTSTR lpNewFileName,
DWORD dwFlags
);

If dwFlags specifies MOVEFILE_DELAY_UNTIL_REBOOT and lpNewFileName is NULL, MoveFileEx ...
by iNX
Thu Mar 27, 2008 7:03 pm
Forum: Coding Questions
Topic: [PB4.20b2] Debug PeekF(@v1+OffsetOf(...)) works not always
Replies: 20
Views: 2862

Ok, i had a look at this .dll and in this case you could get the result with a bit of inline assembly.

after the function call, the two returned values are stored in CPU registers EAX and EDX, so you can retrieve them this way:

Define X.f, Y.f

call....

EnableASM
mov X, EAX
mov Y, EDX
DisableASM ...
by iNX
Thu Mar 27, 2008 11:28 am
Forum: Coding Questions
Topic: [PB4.20b2] Debug PeekF(@v1+OffsetOf(...)) works not always
Replies: 20
Views: 2862

Unfortunately i can't be of much help other than explaining why your code was acting that way. In fact now your problem narrows down to handle a library call that returns a structure, instead of a pointer to a structure.
I don't know how to handle such case in purebasic, i think it's not natively ...
by iNX
Thu Mar 27, 2008 10:54 am
Forum: Coding Questions
Topic: [PB4.20b2] Debug PeekF(@v1+OffsetOf(...)) works not always
Replies: 20
Views: 2862

IceSoft wrote:
iNX wrote:Since you're reading memory used internally by Purebasic, changing the valour of variables modifies this memory and you're obtaining different results.
PB bug?
No, no.. it's normal behaviour. We are not supposed to read memory in this way.
by iNX
Thu Mar 27, 2008 10:36 am
Forum: Coding Questions
Topic: [PB4.20b2] Debug PeekF(@v1+OffsetOf(...)) works not always
Replies: 20
Views: 2862

Since you're reading memory used internally by Purebasic, changing the valour of variables modifies this memory and you're obtaining different results.
by iNX
Thu Mar 27, 2008 10:23 am
Forum: Coding Questions
Topic: [PB4.20b2] Debug PeekF(@v1+OffsetOf(...)) works not always
Replies: 20
Views: 2862

The original source posted can't work, in my opinion, because @v1+OffsetOf(cpVect\x) ends up in memory allocated by PureBasic and we really don't know what we're going to read.
The Hroudtwolf version seems correct, and maybe the problem lies in the return value of the library function, or in the way ...
by iNX
Sun Jan 20, 2008 9:55 pm
Forum: The PureBasic Editor
Topic: Code Beautyfier for the IDE (also useful for jaPBe)
Replies: 17
Views: 19409

... Then if you run the tool again with nothing selected ...
Sorry Ive forgot to mention in here: You must select an area to be beautyfied, like in jaPBes's STRG+TAB where you also actually do indent the selected area.

Ah, ok, i see.. i've looked into it further and i think i was misleaded by ...
by iNX
Sun Jan 20, 2008 9:03 pm
Forum: The PureBasic Editor
Topic: Code Beautyfier for the IDE (also useful for jaPBe)
Replies: 17
Views: 19409

I'm using this tool with the original PB IDE. Nice job, thank you!
While i was using it, i've noticed something strange:

Start with a "beautified" source, modify a line so that it will be modified by the tool, then select some lines which are already beautified (don't select the modified one) and ...
by iNX
Thu Oct 25, 2007 8:25 pm
Forum: Off Topic
Topic: Thanks gnozal
Replies: 33
Views: 7707

Totally agree with you all.
* Thank you gnozal! *

I have been using pureform and it's a great app!
by iNX
Fri May 25, 2007 9:41 am
Forum: Coding Questions
Topic: Passing strings to procedures "By Ref"(theoretical
Replies: 27
Views: 6526

Thank you guys for your attention and help.
I had started this topic because i needed a procedure to change multiple string variables passed as arguments, and i was wondering which was the best way to do it and whether there were multiple ways.
Now things are much clearer and we've also pointed out ...
by iNX
Thu May 24, 2007 4:21 pm
Forum: Coding Questions
Topic: Passing strings to procedures "By Ref"(theoretical
Replies: 27
Views: 6526


And here's is the best and fastest solution for it imho:
http://www.purebasic.fr/english/viewtopic.php?t=26326


@iNX, you have realized about it :wink:

I read carefully your solution and i've got a question. I understand your point from a theoretical point of view and i understand the various ...
by iNX
Thu May 24, 2007 1:33 pm
Forum: Coding Questions
Topic: Passing strings to procedures "By Ref"(theoretical
Replies: 27
Views: 6526

This means that the function has no chance of pointing the original string variable to any new buffer which is allocated. :)

This is a perfect summary of the matter.

In the end, we could say that passing a pointer to a string to a procedure can be considered safe only for reading the string ...
by iNX
Thu May 24, 2007 12:15 pm
Forum: Coding Questions
Topic: Passing strings to procedures "By Ref"(theoretical
Replies: 27
Views: 6526

Ok, i investigated further, looking at the asm sources and i should have found out where the problem lies.
A bigger problem will be being able to explain it :mrgreen:

Procedure ModString(a)
*b.string=@a
*b\s="2434567892434567892434767767677676" ; At this point, the internal function that handles ...
by iNX
Thu May 24, 2007 9:03 am
Forum: Coding Questions
Topic: Passing strings to procedures "By Ref"(theoretical
Replies: 27
Views: 6526

To my mind, PB has it right in that pointers, in terms of de-referencing operations at least, are intended really for structures. It keeps things very 'clean' and simple.

My opinion is that pointers are really useful and indispensable. I'm only wondering about the need for a *stringpointer.s ...