Search found 76 matches

by Carlos Herrera
Feb 19, 2020 10:29
Forum: Tips and Tricks
Topic: Simple tangent.
Replies: 16
Views: 926

Re: Simple tangent.

@badidea Generally don't evaluate polynomial like this: function polynomial_type.value(x as double) as double return coefficient(3) * x ^ 3 + coefficient(2) * x ^ 2 _ + coefficient(1) * x + coefficient(0) end function It is really a bad idea :-) Rather try the following: function polynomial_type.val...
by Carlos Herrera
Feb 18, 2020 20:15
Forum: Tips and Tricks
Topic: Simple tangent.
Replies: 16
Views: 926

Re: Simple tangent.

I am not sure what it is all about, but usually derivative is better defined in a symmetric way: #include "crt.bi" Function gradient(f as any ptr,x As Double) As Double var g =cast(Function(As Double) As Double,f) static As Double dx=1e-6 Return (g(x+dx)-g(x))/dx End Function Function diff...
by Carlos Herrera
Dec 24, 2019 9:08
Forum: Community Discussion
Topic: [offtopic]my girls
Replies: 5
Views: 595

Re: [offtopic]my girls

(*) No war, never hungry, the water are clear and education are free. Are you serious? - The level of public education dramatically goes down... - Water is polluted... - Food is wasted... - There is a hybrid war against rationalism and Enlightenment ideas... Anyway, I am optimistic in a sense of Da...
by Carlos Herrera
Oct 18, 2019 7:35
Forum: Community Discussion
Topic: FreeBASIC 1.08 Development
Replies: 228
Views: 19174

Re: FreeBASIC 1.08 Development

Perhaps it would be easier if there were a default set of GUI commands, like in Visual Basic or RapidQ, but that topic had been discussed several times in the past: the issue is not the lack of a GUI, but the fact that there are too many of them. Unfortunately, the lack of a default set of GUI comm...
by Carlos Herrera
Sep 20, 2019 17:01
Forum: Beginners
Topic: File created by an external program
Replies: 4
Views: 1963

Re: File created by an external program

@grindstone
This is very nice solution but I would rather avoid windows.bi, therefore
I will follow MrSwiss suggestion. In fact, I have contemplated something similar
with renaming of a "control" file.
Thank you both.
by Carlos Herrera
Sep 20, 2019 8:06
Forum: Beginners
Topic: File created by an external program
Replies: 4
Views: 1963

File created by an external program

File is created by external program and FreeBasic should wait until it is done. I tried to introduce the necessary delay by checking the file length: Dim As String pathim Dim As Integer length1, length2 ' check if file is ready Do length1 = Filelen(pathim) Sleep 100 length2 = Filelen(pathim) Loop Un...
by Carlos Herrera
Jul 28, 2019 8:47
Forum: General
Topic: How to draw simple scatterplot with GSL
Replies: 8
Views: 4950

Re: How to draw simple scatterplot with GSL

Have a look at FBMath library by Jean Debord.
by Carlos Herrera
Jun 08, 2019 8:33
Forum: Windows
Topic: How to detect that window has been resized
Replies: 5
Views: 5278

Re: How to detect that window has been resized

Thank you JJ in the name of miserable FB coders. I will try to squeeze your solution into WinGUI framework. BTW, when compiling your program I have got the following warnings (1.05). ..warning 1(1): Passing scalar as pointer, at parameter 10 of CREATEWINDOWEX() ..warning 4(1): Suspicious pointer ass...
by Carlos Herrera
Jun 07, 2019 22:55
Forum: Windows
Topic: How to detect that window has been resized
Replies: 5
Views: 5278

How to detect that window has been resized

Dear All, Please consider the following program (it uses WinFB library) '=============================================================================== ' How to detect that window have been resized? '=============================================================================== #Include "WinG...
by Carlos Herrera
Jun 01, 2019 17:36
Forum: Projects
Topic: Simple WinAPI GUI library
Replies: 59
Views: 29493

Re: Simple WinAPI GUI library

@UEZ Great, beautiful pattern. However, it is not clear, at least for me, how to use this procedure in the context of WinGUI library. For example with ... Dim As HWND hHWND 'ScreenControl(FB.GET_WINDOW_HANDLE, Cast(Integer, hHWND)) hHWND = Window_New (40, 40, 860, 860, "Test") draw_buffer(...
by Carlos Herrera
Jun 01, 2019 8:30
Forum: Projects
Topic: Simple WinAPI GUI library
Replies: 59
Views: 29493

Re: Simple WinAPI GUI library

Hey, First of I would like thank the creator for this nice library. Later when using the library I realized that it would be nice if we could also put freebasic image buffers onto a window. I already compiled a subroutine of code (from various code snippets from the forum) that gets the job done, ....
by Carlos Herrera
May 20, 2019 16:40
Forum: Projects
Topic: Creating (scientific) plots via gnuplot
Replies: 68
Views: 21775

Re: Creating (scientific) plots via gnuplot

Here is some dislin code for the original voltage over current display. I found inc\dislin.bi but the linker is not happy: ld.exe: cannot find -ldismgc I have also downloaded the MediaFire dislin.zip but there is no readme explaining where the files should end up, relative to fbc.exe. Go to the dis...
by Carlos Herrera
May 16, 2019 20:34
Forum: General
Topic: using gnuplot in Windows
Replies: 13
Views: 1432

Re: using gnuplot in Windows

@jj2007 Since I don't now how to create "window" or "control" in a simple way, such problems do not bother me much. But of course, it would be nice to "dock" gnuplot terminal within window created with winAPI. However, this question should be asked to "resident exp...
by Carlos Herrera
May 16, 2019 18:33
Forum: General
Topic: using gnuplot in Windows
Replies: 13
Views: 1432

Re: using gnuplot in Windows

I use gnuplot for plotting live data in my project. The small demo program is attached below. I use Open Pipe trick, which I have learned from this forum. I am mot sure if the same results can be obtained using shell command. Carlos ' ' Gnuplot plotting of live data demo ' #Include Once "crt\st...
by Carlos Herrera
May 16, 2019 8:27
Forum: Projects
Topic: Creating (scientific) plots via gnuplot
Replies: 68
Views: 21775

Re: Creating (scientific) plots via gnuplot

This is a very good idea but I think in general it is better to open gnuplot in persistent mode and write to its graphics terminal directly, using the Open Pipe mechanism. Gnuplot terminal, at least on windows, is very impressive (antialiasing, GDI+,...) and very fast. If an old and buggy fbgfx form...

Go to advanced search