Search found 24 matches
- Jul 03, 2023 3:39
- Forum: General
- Topic: Wrong result from val()
- Replies: 2
- Views: 766
Wrong result from val()
I discovered this by not reading the manual :D dim as integer a, b, c dim as string s print "Testing the val() function" : print s = "+0x123" : print s; " = "; hex(val(s)); " = "; val(s) s = "-0x123" : print s; " = "; hex(val(s)); " = ...
- Jan 19, 2023 3:19
- Forum: Windows
- Topic: In-Memory Dialogs
- Replies: 78
- Views: 101146
Re: In-Memory Dialogs
Hi Dave. This is from the main window proceedure of a program where I ask for parameters to be entered. Case 201: ' Options - Match Fit dim as LPDLGTEMPLATE lpdt ' 1st param is "cdit" & must match number of controls defined. top left, bottom right, "Title", template Dialog( 1...
Re: libjpeg
I decided to recompile libjpeg (with w64devkit) with error messages sent to a windows message box rather than STDOUT, and when I did, I had to revert to the original jpeglib.bi file. Here's the new version of jconfig.h /* jconfig.h --- generated by ckconfig.c */ /* see jconfig.txt for explanations *...
- Nov 04, 2022 23:51
- Forum: Windows
- Topic: In-Memory Dialogs
- Replies: 78
- Views: 101146
Re: In-Memory Dialogs
>fbc64 --version FreeBASIC Compiler - Version 1.09.0 (2021-12-31), built for win64 (64bit) Copyright (C) 2004-2021 The FreeBASIC development team. standalone >fbc64 Button_grid_demo.bas dialogs.bas(131) error 58: Type mismatch, at parameter 3 of MULTIBYTETOWIDECHAR() in 'asciistring, _' To get it to...
- Nov 03, 2022 3:11
- Forum: Windows
- Topic: Browse for Folder - How?
- Replies: 5
- Views: 1742
Re: Browse for Folder - How?
Thanks for all the help, and a special thanks to dodicat for that sweet little example. 

- Oct 31, 2022 22:29
- Forum: Windows
- Topic: Browse for Folder - How?
- Replies: 5
- Views: 1742
Browse for Folder - How?
I want something like openFileDialog but I want it to return a path that I can then use as a default location for future operations.
I found this:
https://learn.microsoft.com/en-us/windo ... eforfolder
which calls Shell32.dll but how do I do that, and is there an easier way?
I found this:
https://learn.microsoft.com/en-us/windo ... eforfolder
which calls Shell32.dll but how do I do that, and is there an easier way?
Re: libjpeg
Yes, the leak is gone. I now get: libjpeg Runtime = 2.1991 otherjpeg Runtime = 8.4322 I'm concerned with speed because I'm going to be scanning thousands of pictures. Here's a little colour and silliness :lol: ' Some Jpeg fun and games ' Compile as 64bit console with libotherjpeg.a in the same direc...
Re: libjpeg
That library is impressive for its size. Only 10k! It must be calling windows routines to get most of the work done. I decided to compare the decompress speeds of the two libraries. My results are that libjpeg is about 3 times faster. My CPU takes 2.4 seconds for 5000 reads of color.jpg via libjpeg ...
Re: libjpeg
It works :wink: I don't think that jpeglib.bi was ever tested with a 64bit windows compiler. Perhaps it was tested with 64bit linux. The conditionals are becoming convoluted, but it works now so I'm happy. diff -b -a jpeglib\ -\ Copy.bi jpeglib.bi --- jpeglib - Copy.bi +++ jpeglib.bi @@ -92,10 +92,1...
Re: libjpeg
~ $ gcc --version gcc (GCC) 12.1.0 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The gcc from w64devkit looks more generic. I have managed to comp...
Re: libjpeg
Hi dodicat, Thanks for spending some time and effort on this. Is there a way to persuade the gcc and other GNU tools in \FreeBASIC-1.09.0-winlibs-gcc-9.3.0\bin\win64 to make this library? I have the feeling that if the same compiler compiled the library and the test program then it would be able to ...
Re: libjpeg
I should have started this thread under Library Questions. My bad. The 32bit library from https://sourceforge.net/projects/fbc/files/Older%20versions/0.90.1/Binaries%20-%20Windows/Libraries/ works Ok, but I want 64bit. When I build the library using https://github.com/skeeto/w64devkit I can "ma...
libjpeg
Hi guys,
I'm trying to compile
FreeBASIC-1.09.0-winlibs-gcc-9.3.0\examples\files\jpeglib\example.bas
but I don't have libjpeg.a
Where do I get it or how do I compile the source from http://ijg.org/ so that the result will work with my FB compiler?
I only care about the 64bit version.
I'm trying to compile
FreeBASIC-1.09.0-winlibs-gcc-9.3.0\examples\files\jpeglib\example.bas
but I don't have libjpeg.a
Where do I get it or how do I compile the source from http://ijg.org/ so that the result will work with my FB compiler?
I only care about the 64bit version.
- Apr 01, 2022 23:38
- Forum: Documentation
- Topic: Chr limit
- Replies: 3
- Views: 8409
Chr limit
The maximum number of characters in a string constructed with chr( ch0 [, ch1 ... chN ] ) is 32.
The FreeBasic Manual doesn't say anything about N <= 32.
Perhaps it should
The FreeBasic Manual doesn't say anything about N <= 32.
Perhaps it should

- Feb 25, 2022 23:51
- Forum: Windows
- Topic: Segmentation fault
- Replies: 10
- Views: 2040
Re: Segmentation fault
Thanks for the quick replies. Perhaps the compiler can get smarter and keep a running total estimate of stack use by variables and either issue a warning or silently move the variables to the heap. Why are large arrays ever put on a limited stack anyway? On a side note, Quicksort is only about 6 tim...