Search found 5878 matches

by dodicat
Aug 19, 2019 0:00
Forum: Community Discussion
Topic: New array features
Replies: 130
Views: 12212

Re: New array features

Hi JK. I hate doing this again, but sorry the errors are still there with your FB64 fbc.exe for the dodicat-sortorig I get error 42: Variable not declared, nocase in 'array(sort, (l, nocase)) '0.58' if I switch to my own sort sortup(L(),Lbound(L),Ubound(L)) I get .9 seconds for the sort and .7 secon...
by dodicat
Aug 18, 2019 21:13
Forum: Community Discussion
Topic: New array features
Replies: 130
Views: 12212

Re: New array features

I followed your instructions. With a fresh copy of fb 64 bit. 1) made your fbc_64.exe into fbc.exe 2) Added your two .bi files to the include folder. 3) Added the fbrt0.o, libfb.a and libfbmt.a Your array descriptor and insert deletete compiled OK. But my main interest (your syntax_test_sort.bas ) t...
by dodicat
Aug 18, 2019 18:16
Forum: Game Dev
Topic: Physics question
Replies: 74
Views: 5695

Re: Physics question

One of the astronauts has unfortunately passed away. But that is not the end of the story, he must now be laid to rest on a nearby asteroid. The resting place has been prepared. Type pt As Double x,y,z End Type Const pi=4*Atn(1) Dim Shared As Double systemconstant Sub createpolygon(p() As pt,n As Lo...
by dodicat
Aug 17, 2019 23:33
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 7608

Re: StringArray Sort (case independent)

Looks like nm.exe resides in mingw, which I have a 32 bit version on path.
I apologize for wasting time.
by dodicat
Aug 17, 2019 22:56
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 7608

Re: StringArray Sort (case independent)

Call this file this.bas

Code: Select all

 
'this.bas
sub getnames()
 shell "nm -g this.exe"
end sub

Print "starting"
getnames
sleep


Compile it with the -g flag (to keep the symbols)
Then run it.
do it with 32 bits then 64 bits.
by dodicat
Aug 17, 2019 21:53
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 7608

Re: StringArray Sort (case independent)

My question was not for JK. (Any .o or .a or .exe (with symbols) apply) 32 bit versus 64 bit has been discussed. This system is 64 bits, but the shell command nm only catches 32 bit files. (nm should show all the functions used inside library files) So, a function of the command shell in a 64 bit sy...
by dodicat
Aug 17, 2019 19:18
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 7608

Re: StringArray Sort (case independent)

Win 10 64 bits. Why does nm not work for 64 bit files It shows the table of .o files only e.g. nm libfb_64.a gives Microsoft Windows [Version 10.0.18362.295] (c) 2019 Microsoft Corporation. All rights reserved. (then the path) then . . . . . . nm: array_sort.o: File format not recognized nm: array_t...
by dodicat
Aug 17, 2019 16:53
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 7608

Re: StringArray Sort (case independent)

Used to like that old song https://www.youtube.com/watch?v=W6N3o4TDYsI JK Power basic. Is this where you got those ideas of built in array functions? What about recursive macros as well? I think by inlining code in my quicksort it makes not a jot of difference to 64 bit with optimisations. I think -...
by dodicat
Aug 17, 2019 13:10
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 7608

Re: StringArray Sort (case independent)

Thanks JK.
I'll start from fresh with a new fb and your latest build.
by dodicat
Aug 17, 2019 10:31
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 7608

Re: StringArray Sort (case independent)

JK Working directly within the new folder and using the executable Fbc_64.exe The command is Fbc_64.exe dodicat_sort.bas. The errors: dodicat_sort.bas(1) error 17: Syntax error, found 'compiler' in '#compiler freebasic' . . . fbc-array\fbc-array\new\ustring.bi(16) error 23: File not found, "crt...
by dodicat
Aug 17, 2019 10:06
Forum: Game Dev
Topic: Mouse trouble
Replies: 21
Views: 2120

Re: Mouse trouble

ITomi
Didn't you try my change to your code?
by dodicat
Aug 17, 2019 9:58
Forum: Game Dev
Topic: Mouse trouble
Replies: 21
Views: 2120

Re: Mouse trouble

Try this. 1) Put the variables dim as integer mousex,mousey,mousebutton,mouse at the beginning of the sub so they are global to the goings on. 2) Just before leaving the sub, put leftmousebuttonpressed=mousebutton #include "fbgfx.bi" Using FB dim shared as ubyte numofshowicon,leftmousebutt...
by dodicat
Aug 16, 2019 20:27
Forum: Game Dev
Topic: Mouse trouble
Replies: 21
Views: 2120

Re: Mouse trouble

I tried that basiccoder2 (I hate elseif)
It worked up and down the cycles, but the little arrows didn't show on clicking.
by dodicat
Aug 16, 2019 18:38
Forum: Game Dev
Topic: Mouse trouble
Replies: 21
Views: 2120

Re: Mouse trouble

It is quite hard for me to follow. But if you omit leftmousebuttonpressed=0 from the first bit it seems to be OK. #include "fbgfx.bi" Using FB dim shared as ubyte numofshowicon,leftmousebuttonpressed=0,arraystart,canscrollmenu dim shared as any ptr whitecircle,leftarrowspr(2),rightarrowspr...
by dodicat
Aug 16, 2019 12:09
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 7608

Re: StringArray Sort (case independent)

I found a pointer method for quicksort and adapted it accordingly. Now less than .8 seconds for a million. Only sortup is used here. Strangely I cannot get a quicksort macro method up to speed, thinking that macro calls will inline everything rather than function calls. I don't suppose I'll get to ....

Go to advanced search