Search found 94 matches

by technicorn
Tue Nov 26, 2013 9:49 pm
Forum: Coding Questions
Topic: Bug with DYNAMICCPU?
Replies: 6
Views: 1719

Re: Bug with DYNAMICCPU?

I think, you have misinterpreted this switch!

This switch is to use, for example mmx extension is supported by CPU and Lib/Userlib!
In the moment, there is IMHO no Userlib, that support this, so the switch is useles
in this time :wink:

It's just what I want to do, writing some user libs that use ...
by technicorn
Tue Nov 26, 2013 6:05 pm
Forum: Coding Questions
Topic: Bug with DYNAMICCPU?
Replies: 6
Views: 1719

Bug with DYNAMICCPU?

It seems there is a problem with the /DYNAMICCPU switch on PB 5.21 LTS on windows 7 64bit.

When I use it with the 32 bit compiler the "Dynamic0", "Dynamic1" and so on labels are missing a colon, so you get an assembler error.

With the 64 Bit compiler there are two errors in the emited asm, first ...
by technicorn
Thu Oct 07, 2010 11:14 pm
Forum: Coding Questions
Topic: PB 4.51f x86 Size of character in resident is fixed
Replies: 2
Views: 711

Re: PB 4.51f x86 Size of character in resident is fixed

@freak: Many thanks for this fast reply at this late hour
Will change my resident building tool to always create both versions
by technicorn
Thu Oct 07, 2010 9:37 pm
Forum: Coding Questions
Topic: PB 4.51f x86 Size of character in resident is fixed
Replies: 2
Views: 711

PB 4.51f x86 Size of character in resident is fixed

Using PB V4.51 final on XP 32bit

There seem to be a bug in the creation of resident files with the size of characters (.c) in structures.
If you use such structures, the size of .c stays as the compiler setting of ascii / unicode generated code when the resident file was created.


Structure ...
by technicorn
Sun Jan 25, 2009 3:57 am
Forum: Coding Questions
Topic: Freememory() in thread with debugger enabled
Replies: 8
Views: 1619

@cas
Tested with debugger on
The problem with freeing memory doesn't happen on 32 bit windows (XP home with SP3)
So either 64 bit windows behaves different, or there's a bug in the 64 bit version of PB

@trond
Try to write something into the allocated memory and it will allocate the memory in RAM ...
by technicorn
Sun Jan 04, 2009 6:59 pm
Forum: Coding Questions
Topic: NextElement after DeleteElement
Replies: 7
Views: 1474

Manual wrote:
But, if the parameter 'Flags' is set to 1 and the first element is deleted, the new current element will be the second one.

Than this should be stated more clearly in the manual that the flag only changes the behaviour on deleting the first element,
and there should be a flag value ...
by technicorn
Sun Jan 04, 2009 5:27 pm
Forum: Coding Questions
Topic: NextElement after DeleteElement
Replies: 7
Views: 1474

Normaly I try to avoid sarcastic comments on other, but not this time.

1. I know that using FirstElement() would be faster,
I programmed a linked list library myself which has 1500+ lines of PB code,
and if you read some of my posts, you should now that I know what im programming (most of the time ...
by technicorn
Sun Jan 04, 2009 5:02 pm
Forum: Coding Questions
Topic: mdi question
Replies: 2
Views: 1080

Maybe this give you a hint:


#Main = 0
If OpenWindow(#Main, 0, 0, 400, 300, "MDIGadget", #PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_SizeGadget|#PB_Window_MaximizeGadget)
If CreateMenu(#Main, WindowID(#Main))
MenuTitle("Menu index 0")
MenuTitle("MDI windows menu")
MenuItem(0 ...
by technicorn
Sun Jan 04, 2009 3:55 pm
Forum: Coding Questions
Topic: Sort (structured) Linked list via multiple fields
Replies: 8
Views: 5166

@akj

It's not possible to use Mergesort for arrays, because Mergesort can't work in place, that means the array would have to be taken apart and then put back together again.

With lists you can use the already existend link headers of the list to do it.

For more in depth explanation use google ...
by technicorn
Sun Jan 04, 2009 3:34 pm
Forum: Coding Questions
Topic: NextElement after DeleteElement
Replies: 7
Views: 1474

NextElement after DeleteElement

Run this an you see that not every second element gets deleted as one would expect:


#ListSize = 20
OpenConsole()

NewList l1.l()

For n = 1 To #ListSize
AddElement(l1())
l1() = n
Next n

ResetList(l1())
PrintN("Before deletetion")
n = 0
While NextElement(l1())
PrintN(RSet(Str(n), 3 ...
by technicorn
Sun Jan 04, 2009 1:07 am
Forum: General Discussion
Topic: The Chaos that is Object Oriented Programming
Replies: 8
Views: 3642

Thanks Dreglor, for mentioning my name :)

Made some more investigation on the generating macros with macros problem, and came up with this solution:


EnableExplicit

Macro _EndMacro(p1=EndMac,p2=ro)
p1#p2
EndMacro

Macro GenerateMacro(name)
Macro name(p1,p2)
p1 = p2
:_EndMacro()
EndMacro ...
by technicorn
Fri Dec 26, 2008 1:41 am
Forum: Feature Requests and Wishlists
Topic: Please add GadgetMouseX / Y
Replies: 6
Views: 1555

Thanks for trying to help, but that wouldn't do for gadgets in containers or panels, because you didn't know the offset for borders and alike,
one solution I found on this forum was:


GetCursorPos_(p.POINT)
ScreenToClient_( GadgetID(#Gadget), p)


and it works, but is for Windows only.
I didn't ...
by technicorn
Thu Dec 25, 2008 10:41 am
Forum: Feature Requests and Wishlists
Topic: Please add GadgetMouseX / Y
Replies: 6
Views: 1555

Please add GadgetMouseX / Y

Happy Christmas!

Is it to late for Christmas wishes? ;)

Would be nice to have a GadgetMouseX / Y function to tell the position
relative to the upper left corner of a gadget,
I know it can be done with simple API funtions on Windows,
but it would be nice to have a cross platform funtion build in ...
by technicorn
Fri Dec 19, 2008 6:49 am
Forum: Feature Requests and Wishlists
Topic: Having uninitilaized Protected variables
Replies: 2
Views: 945

Edit: By the way, static variables can be used instead if you don't use recursion.
And you don't plan on using the procedure with threads ;)
by technicorn
Thu Dec 18, 2008 9:03 pm
Forum: Feature Requests and Wishlists
Topic: Having uninitilaized Protected variables
Replies: 2
Views: 945

Having uninitilaized Protected variables

Having the possiblity to have Protected variables in Procedures that are not initialized to zero,
would speed up Procedure calls a lot if you have many variables in it, that are set to other values than zero anyway.
Only exception would be strings, which pointer have to be set to zero
for the ...