Search found 1356 matches

by St_W
Sep 03, 2018 11:01
Forum: Beginners
Topic: FreeBasic equivalent of template in c++
Replies: 5
Views: 186

Re: FreeBasic equivalent of template in c++

As paul already mentioned FB has no generics currently. You can use macros to get a similar functionality for simple scenarios, but of course it's no replacement for generics.
by St_W
Sep 03, 2018 10:54
Forum: General
Topic: Free Basic Compilers Version 1.06.0 (08-26-2018) seem broken
Replies: 94
Views: 2918

Re: Free Basic Compilers Version 1.06.0 (08-26-2018) seem broken

@jj2007: we cannot simply implicitly convert a zstring ptr to long as it could cause a lot of mistakes for beginners. Just consider a comparison like this: if "5" < 10 then print "lower" ' what's actually meant: if val("5") < 10 then ... Beginners tend to do a lot of su...
by St_W
Sep 02, 2018 12:41
Forum: General
Topic: Free Basic Compilers Version 1.06.0 (08-26-2018) seem broken
Replies: 94
Views: 2918

Re: Free Basic Compilers Version 1.06.0 (08-26-2018) seem broken

I was actually thinking about this couple days ago, almost updating CompilerErrMsg and noticing that the error/warning identification numbers have changed for messages from one fbc version to the next. IIRC the page's error/warning messages are automatically extracted from fbc source code, so you p...
by St_W
Aug 31, 2018 8:55
Forum: General
Topic: Free Basic Compilers Version 1.06.0 (08-26-2018) seem broken
Replies: 94
Views: 2918

Re: Free Basic Compilers Version 1.06.0 (08-26-2018) seem broken

re documentation: Also "-w constness" seems to be absent from the list. re compiler warnings for cast: I'm not even sure whether CAST should generate a warning if constness is casted away (I don't know for sure without trying it out, butI think C wouldn't generate a warning in that case, w...
by St_W
Aug 30, 2018 21:23
Forum: Windows
Topic: PowerShell hashing
Replies: 10
Views: 478

Re: PowerShell hashing

We can use SHA512 but on my machine, it runs out of space and clips the result. Are you referring to the output format? You can easily change that, e.g. like this: PS D:\dev\fbc> Get-FileHash readme.txt -Algorithm SHA512 | Format-List Algorithm : SHA512 Hash : D3B48B6756D35DB2A9E91CA135FDEE303F2DAF...
by St_W
Aug 30, 2018 8:16
Forum: General
Topic: Free Basic Compilers Version 1.06.0 (08-26-2018) seem broken
Replies: 94
Views: 2918

Re: Free Basic Compilers Version 1.06.0 (08-26-2018) seem broken

I expected that the FB CAST behaves similar to a cast in C (or at least not more strict than in C). So if you'd implement my previous example (see https://freebasic.net/forum/viewtopic.php?p=251252#p251252) in C it could look like the one below. The thing is that C doesn't complain about the cast be...
by St_W
Aug 29, 2018 22:26
Forum: General
Topic: Free Basic Compilers Version 1.06.0 (08-26-2018) seem broken
Replies: 94
Views: 2918

Re: Free Basic Compilers Version 1.06.0 (08-26-2018) seem broken

Most changes/fixes were related to constness qualifiers, however none are involved in the example (except there are some hidden ones?). In general the changes made fbc's error checking more strict. I'm unsure whether that's the right way to go for the FreeBasic language - on one hand I like verbose ...
by St_W
Aug 29, 2018 21:25
Forum: General
Topic: Free Basic Compilers Version 1.06.0 (08-26-2018) seem broken
Replies: 94
Views: 2918

Re: Free Basic Compilers Version 1.06.0 (08-26-2018) seem broken

Here's some simple code to reproduce the warnings. As deltarho[1859] already mentioned, it seems that the casts do not really work as expected. type delegate1 as function( a as integer ) as integer function dummy ( a as delegate1, another as integer ) as integer return 1 end function sub oneparam ( ...
by St_W
Aug 29, 2018 15:24
Forum: Community Discussion
Topic: Where can I get a Recent-Git-Build of FreeBASIC?
Replies: 420
Views: 54252

Re: Where can I get a Recent-Git-Build of FreeBASIC?

With the latest 32 bit build, I get 'warning 43(0):Argument count mismatch' at OFFENDING LINE. That is a false error because we do not have an argument count mismatch. Looks similar to the problem reported by José: https://freebasic.net/forum/viewtopic.php?f=3&t=26976 Sounds like a regression i...
by St_W
Aug 29, 2018 12:03
Forum: General
Topic: fbc x64 compile to lib anomalies
Replies: 13
Views: 590

Re: fbc x64 compile to lib anomalies

I have msys2 installed on my VM with gcc version 8.2.0, if I copy the official FB 1.05 distribution for mingw toolchain the test segfaults however with mingw x86_64-5.2.0-release-win32-sjlj-rt_v4-rev0 the test runs OK Mixing different toolchains (or toolchain versions) isn't a good idea in general ...
by St_W
Aug 29, 2018 11:54
Forum: Community Discussion
Topic: Where can I get a Recent-Git-Build of FreeBASIC?
Replies: 420
Views: 54252

Re: Where can I get a Recent-Git-Build of FreeBASIC?

btw, one can merge win32 and win64 packages. (but all you get is a shared include folder, as everything else is platform specific) The "bin" and "lib" folders already use platform-specific subfolders, but there are a few other changes necessary: - if using a standalone build (def...
by St_W
Aug 29, 2018 11:31
Forum: Community Discussion
Topic: Where can I get a Recent-Git-Build of FreeBASIC?
Replies: 420
Views: 54252

Re: Where can I get a Recent-Git-Build of FreeBASIC?

All my Windows packages contain a standalone version of the compiler, which should work out-of-the-box (but does not include any headers/import-libraries for 3rd partly libs except those required for building the compiler itself). So you can just use "fbc_win32_gcc810_..." instead of "...
by St_W
Aug 28, 2018 23:23
Forum: General
Topic: fbc x64 compile to lib anomalies
Replies: 13
Views: 590

Re: fbc x64 compile to lib anomalies

thank you St_W for the updated version, unfortunately the results for my test are the same. hm, ok. Did you already try the official 1.05 release build as you mentioned above? If you get a different result (like it seems dodicat did) maybe you could also try older versions of my builds that should ...
by St_W
Aug 28, 2018 22:44
Forum: Community Discussion
Topic: Where can I get a Recent-Git-Build of FreeBASIC?
Replies: 420
Views: 54252

Re: Where can I get a Recent-Git-Build of FreeBASIC?

I noticed that in the inc folder of fbc_win32_mingw_0515_2018-08-26 most of the files are dated 2014. On the other hand in the inc folder of fb-win32-gcc810 all the files are dated 03/06/2018. That struck me as being odd but there may be a good reason for this. There's a simple explanation for this...
by St_W
Aug 27, 2018 23:19
Forum: General
Topic: fbc x64 compile to lib anomalies
Replies: 13
Views: 590

Re: fbc x64 compile to lib anomalies

The GCC version I'm using for my builds is quite old meanwhile (gcc 4.9.0 for x86, gcc 4.8.2 for x64). You could also try a testing build with gcc 8.1.0 from http://users.freebasic-portal.de/stw/bu ... om/gcc810/ . If that works it's probably some gcc bug.

Go to advanced search