Search found 7932 matches

by dodicat
Mar 19, 2024 10:18
Forum: Community Discussion
Topic: Bugs
Replies: 115
Views: 21214

Re: Bugs

Can somebody explain this in fb 1.10 sub test(byref s as integer ptr) print __function__,s dim as integer k s=@k end sub dim as integer g=2024 dim as integer ptr p=@g print " Original pointer value "; p test(p) print "Pointer value after sub "; p p=@g print "________________...
by dodicat
Mar 18, 2024 23:15
Forum: General
Topic: screenres with a vertical scroll bar
Replies: 16
Views: 838

Re: screenres with a vertical scroll bar

You will have to make your own scrolling mechanism for fb screens. this old code: #cmdline "-gen gcc -O 2" '============= FONTS SET UP ========================== Function Filter(Byref tim As Ulong Pointer,_ rad As Single,_ destroy As Long=1,_ fade As Long=0) As Ulong Pointer #define map(a,...
by dodicat
Mar 17, 2024 11:53
Forum: Windows
Topic: How to color text created by CreateWindowExa
Replies: 18
Views: 755

Re: How to color text created by CreateWindowExa

This should start off, only mouse directly on the scroller, I'm sure you'll find all the other options with google 'CODE BY UEZ, added some vertical scrolling #include once "windows.bi" #include "crt.bi" Dim As MSG msg ' Message variable (stores massages) Dim Shared As HWND hWndx...
by dodicat
Mar 17, 2024 2:25
Forum: Windows
Topic: How to color text created by CreateWindowExa
Replies: 18
Views: 755

Re: How to color text created by CreateWindowExa

Here is UEZ's code with scrolling (via a trackbar) 'BY UEZ with scroll added #include once "windows.bi" #Include once "/win/commctrl.bi" Dim As MSG msg ' Message variable (stores massages) Dim Shared As HWND hWndx, stc1, stc2 ,bar ' Window variable and object variables Dim As HFO...
by dodicat
Mar 17, 2024 0:41
Forum: Windows
Topic: How to color text created by CreateWindowExa
Replies: 18
Views: 755

Re: How to color text created by CreateWindowExa

But you can scroll your static windows with coloured text in the same way. In the Winproc, if you use one Case WM_VSCROLL Select Case lparam Case bar trackpos= SendMessage(bar, TBM_GETPOS, 1, 0) then use movewindow adding trackpos or a multiple of it to the y value. You'll have to juggle about with ...
by dodicat
Mar 16, 2024 23:59
Forum: Windows
Topic: How to color text created by CreateWindowExa
Replies: 18
Views: 755

Re: How to color text created by CreateWindowExa

You can scroll child windows with a trackbar. Example using wonky buttons coloured by temp bitmaps. #include once "windows.bi" #Include once "/win/commctrl.bi" #include "fbgfx.bi" Function CreateTrackBar(dest As hwnd,x As Long,y As Long,lngth As Long,height As Long,rang...
by dodicat
Mar 15, 2024 0:45
Forum: General
Topic: -gen clang
Replies: 64
Views: 3305

Re: -gen clang

the following program compiles ok in 32-bit without -asm att the matrix multiplication is from the Rosetta code, but the demo is mine, it shows how drastically the precision is lost type Matrix dim as double m( any , any ) declare constructor ( ) declare constructor ( byval x as uinteger , byval y ...
by dodicat
Mar 12, 2024 23:03
Forum: Sources, Examples, Tips and Tricks
Topic: The Travelling Salesman Problem
Replies: 21
Views: 1228

Re: The Travelling Salesman Problem

That's really neat basiccoder2.
I get quite a few correct.
by dodicat
Mar 12, 2024 19:39
Forum: Sources, Examples, Tips and Tricks
Topic: The Travelling Salesman Problem
Replies: 21
Views: 1228

Re: The Travelling Salesman Problem

I notice that using the nearest neighbour method, it depends where the starting point is. So I have cycled the original array all the way round to get the optimal distance from the optimal starting point. Tested 32/64 bits and with -exx error check. #cmdline "-gen gcc -O 2" Screen 20 Type ...
by dodicat
Mar 11, 2024 12:36
Forum: Beginners
Topic: Multi-line string literal
Replies: 2
Views: 221

Re: Multi-line string literal

You can use a raw string as a macro parameter. You can end each line with | _ an then substitute | with chr(10). I don't think that the pipe character (|) is used anywhere in fb syntax, so it will only exist where you put it and won't clash if substituted with chr(10) #define RAW(p...) #p var s= RAW...
by dodicat
Mar 10, 2024 15:11
Forum: Sources, Examples, Tips and Tricks
Topic: The Travelling Salesman Problem
Replies: 21
Views: 1228

Re: The Travelling Salesman Problem

I have compared my circulate method to the permutations method ( the actual shortest). Only up to 4 to 10 points, beyond that the permutations method is slow. #cmdline "-gen gcc -O 2" Screen 20 Type pt As single x,y End Type Dim Shared As Single d #define intrange(f,l) Int(Rnd*(((l)+1)-(f)...
by dodicat
Mar 08, 2024 22:20
Forum: Sources, Examples, Tips and Tricks
Topic: The Travelling Salesman Problem
Replies: 21
Views: 1228

Re: The Travelling Salesman Problem

We'll need to get this problem solved analytically soon, and not rely on brute force, nearest neighbour or doughnuts.
If we intend eventually to visit every planet in the milky way, we shall have to do it in an orderly manner, and not just drop down hither and thither, uninvited.
by dodicat
Mar 08, 2024 19:54
Forum: Windows
Topic: Interpretation
Replies: 9
Views: 677

Re: Interpretation

I see what you mean Lother.
I'll get rid of it.
by dodicat
Mar 08, 2024 18:02
Forum: Sources, Examples, Tips and Tricks
Topic: The Travelling Salesman Problem
Replies: 21
Views: 1228

Re: The Travelling Salesman Problem

Basiccder2/others. Many years ago (1984), my late wife and myself and our small dog took a long Summer break in our towing caravan. We ended up near London, and parked up in a site by the edge of Epping forest. My wife got a temporary job, at her trade as bookkeeper, in Woodford Green, I took a job ...
by dodicat
Mar 08, 2024 0:32
Forum: Sources, Examples, Tips and Tricks
Topic: The Travelling Salesman Problem
Replies: 21
Views: 1228

Re: The Travelling Salesman Problem

A little more colourful maybe? '#cmdline "-exx" #define intrange(f,l) Int(Rnd*(((l)+1)-(f))+(f)) Dim As String vn(0 To ...) ={"Lockwood Village","Little Hinton","New Malia","Rose Hills","Katoka Village","Lemzilville","Eldervi...