Search found 3328 matches

by MrSwiss
Apr 07, 2020 0:27
Forum: Beginners
Topic: Using Dir command with #Lang "qg" compiler option
Replies: 3
Views: 128

Re: Using Dir command with #Lang "qg" compiler option

waschneider8232 wrote:1) where do I find dir.bi to download?
2) can I find a copy of dir.bi before it is compiled so I can just include it in my file?

1) dir.bi is part of FBC. Located in the <FreeBASIC>\inc\ sub-directory
2) all *.bi files are "clear text", uncompiled source ...
by MrSwiss
Apr 06, 2020 12:40
Forum: Libraries
Topic: libOpenCV Windows/Linux 32/64-bit
Replies: 36
Views: 1172

Re: libOpenCV Windows/Linux 32/64-bit

yzfwsf wrote:Which version of OpenCV is implemented?Tks.

This sort of information is typically found in the threads first (opening) post ...
by MrSwiss
Apr 03, 2020 21:01
Forum: General
Topic: Strange behaviour with #define
Replies: 8
Views: 177

Re: Strange behaviour with #define

Something like that, perhaps?

Code: Select all

#Define concat(a, b)    ( (a) + "." + (b) )

Print concat("NSpace_name", "Func_name")

Sleep
RESULT wrote:NSpace_name.Func_name
by MrSwiss
Apr 03, 2020 19:01
Forum: General
Topic: the mathematical analog clock
Replies: 6
Views: 225

Re: the mathematical analog clock

"QB" is a long time dead, as far as I'm concerned ...
(I'm using "FB" exclusively, since joining here.)
by MrSwiss
Apr 03, 2020 18:39
Forum: General
Topic: the mathematical analog clock
Replies: 6
Views: 225

Re: the mathematical analog clock

The current implementation is very inefficient. A comparison in the Main-Loop whould be much more efficient and, free a lot of CPU time. Only act, if a change of Time has occured ... otherwise "Sleep": Dim As String cTime Do If Time <> cTime Then cTime = Time ' update comparison variable ....
by MrSwiss
Apr 01, 2020 18:29
Forum: Beginners
Topic: (SOLVED) The extra destructor is called
Replies: 13
Views: 312

Re: The extra destructor is called

I think we are talking about different things. No, we don't. You just don't seem to understand the concept of 'temporary' stuff ... Your original code, just without 'temporary': Type rational numerator As Integer denominator As Integer Declare Constructor() Declare Destructor() End Type Constructor...
by MrSwiss
Apr 01, 2020 17:39
Forum: Beginners
Topic: (SOLVED) The extra destructor is called
Replies: 13
Views: 312

Re: The extra destructor is called

I understand that, but I'm interested in this question which basically it turns the extra destructor is called Since the temporary 'type' (which takes the data from the locally created/destroyed 'type') is constructed at 'return time', it can only be destroyed in MAIN-code ... (in the Function you ...
by MrSwiss
Apr 01, 2020 17:18
Forum: Beginners
Topic: (SOLVED) The extra destructor is called
Replies: 13
Views: 312

Re: The extra destructor is called

*created: 140720577747840 <- @R destroyed 140720577747840 <- @R destroyed 140720577747904 ' the destructor is unnecessary from a hidden constructor No way, except you are aiming at: creating willingly, a memory leak. It is as simple as that: - what has been created (anywhere) - must be destroyed (s...
by MrSwiss
Apr 01, 2020 16:51
Forum: Beginners
Topic: (SOLVED) The extra destructor is called
Replies: 13
Views: 312

Re: The extra destructor is called

VANYA wrote:Please explain to me why the destructor is called if the constructor is hidden?

I don't see anything 'hidden', except if you refer to the Functions 'scope'.
1) in Functions scope: ctor/dtor (two times ctor, one dtor)
2) temporary 'type' (Function return) -- dtor in MAIN
by MrSwiss
Apr 01, 2020 16:02
Forum: Beginners
Topic: (SOLVED) The extra destructor is called
Replies: 13
Views: 312

Re: The extra destructor is called

@VANYA, nice try, at a April Fool's prank.
by MrSwiss
Mar 20, 2020 19:42
Forum: Beginners
Topic: What's wrong here?
Replies: 4
Views: 360

Re: What's wrong here?

My StringSplit Function, which uses 'strtok' from FB's CRT: ' this is part of my: String_Procs.bi -- (c) 2019, MrSwiss #Include "crt/string.bi" ' needed for: SplitString() Private Function SplitString( _ ' uses CRT's strtok() Function ByRef ssrc As Const String, _ ' string to be searched B...
by MrSwiss
Mar 15, 2020 14:49
Forum: Community Discussion
Topic: Is there any gui designer for freebasic on linux?
Replies: 8
Views: 370

Re: Is there any gui designer for freebasic on linux?

And there is of course, the good old and trusted: FBEdit (with included resource editor)! (just make sure to get version: 1.0.7.6c, earlier builds may crash) Download (german FB site): https://www.freebasic-portal.de/downloads/ides-fuer-freebasic/fbedit-ide-30.html Obviously, Windows only. But may r...
by MrSwiss
Mar 13, 2020 18:29
Forum: Tips and Tricks
Topic: WIN-API without any #Include "..."
Replies: 13
Views: 528

WIN-API without any #Include "..."

Hi all, especially if we're doing a simple console application, it is not necessary to always #Include "Windows.bi". The very same applies of course also, to Frameworks of any 'colour or shape'. Some of us (including myself) simply don't want those approx. 1.5 MB of predefinitions. There i...
by MrSwiss
Mar 09, 2020 0:33
Forum: Community Discussion
Topic: Installing FreeBasic with Scoop on Windows
Replies: 21
Views: 805

Re: Installing FreeBasic with Scoop on Windows

bubacxo wrote:FreeBasic has a platform problem. to me, it's FB's only real problem.

Don't understand where you are aiming at because, FreeBASIC is hosted on SourceForge & GitHub ???
Are 2 platforms insufficent, do you need more?
by MrSwiss
Mar 05, 2020 17:37
Forum: Windows
Topic: debugging network code
Replies: 4
Views: 218

Re: debugging network code

critical fact: the sockaddr data structure port field uses reverse byte order This isn't really news: network byte order = big endian, AMD/Intel CPU's = little endian (all not network related stuff). DEMO code: ' EndianConv-Procs_test1.bas -- (c) 2020-03-05, MrSwiss ' ' compile: -s console (WIN onl...

Go to advanced search