Search found 1441 matches

by St_W
Dec 08, 2018 18:57
Forum: General
Topic: Been a while...
Replies: 4
Views: 346

Re: Been a while...

Ah right, sorry, forgot that fbc wants a space character between -l and the library name (in contrast to gcc, which doesn't). As linking stdc++ doesn't seem to fix the issue for you some more hints: Note that C++ isn't binary compatible among different compiler versions or compilers. So ideally make...
by St_W
Dec 06, 2018 12:01
Forum: General
Topic: Been a while...
Replies: 4
Views: 346

Re: Been a while...

Are you linking the C++ runtime? If not then do so e.g. using:
fbc -lstdc++
by St_W
Dec 04, 2018 20:09
Forum: General
Topic: Latest FBC 1.05 gives warning 38 with boolean evaluation
Replies: 5
Views: 333

Re: Latest FBC 1.05 gives warning 38 with boolean evaluation

The "Last Update" date on sourceforge refers to everything (including commits to the source repository or changes in the bugtracker). The latest officially released version is 1.0.5 from Jan 31, 2016. I had a look at the package from Arch Linux, which is propably also the one Manjaro Linux...
by St_W
Dec 04, 2018 13:47
Forum: General
Topic: Latest FBC 1.05 gives warning 38 with boolean evaluation
Replies: 5
Views: 333

Re: Latest FBC 1.05 gives warning 38 with boolean evaluation

I'm wondering which build you are effectively using, could you tell us e.g. the Git commit ID it was built from? I'm wondering because the last official build is from January 31, 2016 for Linux: https://sourceforge.net/projects/fbc/files/Binaries%20-%20Linux/ No official updated binary has been publ...
by St_W
Nov 28, 2018 21:44
Forum: Community Discussion
Topic: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize
Replies: 360
Views: 18867

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Jan 2019), 800 $ 1st prize

Tourist Trap wrote:When is the last day to submit something?
The first post in this thread explains it all. The deadline is January 14, 2019 18:00 GMT.
by St_W
Nov 27, 2018 19:01
Forum: Community Discussion
Topic: Dim Byref syntax
Replies: 134
Views: 13683

Re: Dim Byref syntax

[...] As I pointed out earlier, the only way to do it is by directly using pointers. However, this is not very BASIC like, it is more C like. [...] I agree that it is - in general many features that were added to the initial feature-set derived from QBasic are inspired by C or C++. That was the way...
by St_W
Nov 27, 2018 15:53
Forum: Community Discussion
Topic: Dim Byref syntax
Replies: 134
Views: 13683

Re: Dim Byref syntax

This will never compile nor execute because one is not allowed to touch the child reference [...] But it can be easily fixed. Just note that the new operator returns a pointer in FB. type tOne extends object s as string declare constructor() end type constructor tOne() end constructor type tTwo ext...
by St_W
Nov 27, 2018 15:22
Forum: Community Discussion
Topic: Dim Byref syntax
Replies: 134
Views: 13683

Re: Dim Byref syntax

I beg to differ. Control means that you can determine when objects are instantiated. With nested objects that is currently not possible with FB. Individually they can neither be instantiated, null referenced nor deleted. The only workaround is the direct use of pointers. That's what I meant. You in...
by St_W
Nov 27, 2018 14:27
Forum: Community Discussion
Topic: Dim Byref syntax
Replies: 134
Views: 13683

Re: Dim Byref syntax

[...] whereby the programmer is totally responsible for instantiating objects (as it should be) [...] In FB you have full control over the lifecycle of an object, much more than in common OO languages. Most languages nowadays try to relief the programmer from managing the object's lifecycle themsel...
by St_W
Nov 27, 2018 11:50
Forum: Community Discussion
Topic: Nominations for Forum Moderators
Replies: 70
Views: 5261

Re: Nominations for Forum Moderators

Although I'm unsure whether they'd all accept, I'd nominate (or second the nomination for) fxm, PaulSquires, Imortis.
(is there a limit on nominations-per-person?)
by St_W
Nov 26, 2018 16:37
Forum: Community Discussion
Topic: Dim Byref syntax
Replies: 134
Views: 13683

Re: Dim Byref syntax

In general you only need to delete objects you allocated on the Heap, with "new", "allocate", malloc(), etc.
Objects stored on the stack or in a data segment of the application do not need to be deleted.
by St_W
Nov 26, 2018 14:43
Forum: Community Discussion
Topic: Dim Byref syntax
Replies: 134
Views: 13683

Re: Dim Byref syntax

Thanks for the example fxm, I was wrong evidently. I had a look at the C code generated by the C emitter of FB for both return *cptr(tt ptr, 0) (with a byref return value) and dim byref as tt t = *cptr(tt ptr, 0) . The generated code assigns the null pointer to the reference and does...
by St_W
Nov 26, 2018 13:59
Forum: Community Discussion
Topic: Dim Byref syntax
Replies: 134
Views: 13683

Re: Dim Byref syntax

I don't think that you can do that without using pointers explicitly. I would even have expected the application to crash when you " return *cptr(tt ptr, 0) ", because you're returning an object. And this object is constructed from the dereferenced null reference, which should call...
by St_W
Nov 24, 2018 21:35
Forum: General
Topic: Using a DLL
Replies: 8
Views: 397

Re: Using a DLL

Thanks a lot for explaining this behaviour. I would drop the "obviously", though - the linker might as well use the file name of the DLL, or at least check if there is a conflict between file and library name, and issue a warning. Sorry, used the wrong word there, I meant "apparently...
by St_W
Nov 24, 2018 20:39
Forum: Community Discussion
Topic: New website
Replies: 45
Views: 5943

Re: New website

Thanks to whoever (finally) fixed the CSS to make tt tags work again!

Go to advanced search