Search found 7936 matches

by dodicat
Mar 23, 2024 12:08
Forum: Documentation
Topic: SmartPointer_UDTname_ segmentation violation
Replies: 10
Views: 1012

Re: SmartPointer_UDTname_ segmentation violation

That is when you use the option -pp to isolate an error. simple example: fillmatrix.bas '#cmdline "-pp" Type Matrix Dim As Double m( Any , Any ) Declare Constructor ( ) Declare Constructor ( Byval x As Uinteger , Byval y As Uinteger ) Declare Operator Cast() As String End Type Constructor ...
by dodicat
Mar 21, 2024 0:46
Forum: General
Topic: screenres with a vertical scroll bar
Replies: 16
Views: 988

Re: screenres with a vertical scroll bar

The opengl screens are kind of bare bones, they can handle some win32 components. I have not tried scrolling though, maybe sometime. Here are a few: buttons, themes, disable fullscreen, tooltips, fonts. #include "windows.bi" #Include once "/win/commctrl.bi" #include "GL/gl.b...
by dodicat
Mar 20, 2024 11:04
Forum: Community Discussion
Topic: Bugs
Replies: 115
Views: 21581

Re: Bugs

Thank you all for looking into this byval.
Yes srvaldez, static in the sub would have been the proper way.
The last thing I would have thought of was passing a value byval to a procedure, I came across it by accident.
by dodicat
Mar 19, 2024 21:00
Forum: Sources, Examples, Tips and Tricks
Topic: Read line x from a text file
Replies: 2
Views: 245

Re: Read line x from a text file

You have added an extra line end (chr(10)) to the last line in the file in 64 bits. The last line looks strange in 32 bits. 'Coded by UEZ build 2024-03-19 beta #cmdline "-exx" #include "file.bi" Type tFile As WString * 4096 Name End Type Function FileReadLine(sFile As tFile, iLin...
by dodicat
Mar 19, 2024 10:18
Forum: Community Discussion
Topic: Bugs
Replies: 115
Views: 21581

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: 988

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: 914

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: 914

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: 914

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: 914

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: 3611

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: 1349

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: 1349

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: 273

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: 1349

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)...