Search found 1940 matches

by coderJeff
Jun 23, 2019 20:36
Forum: Community Discussion
Topic: Extending Wstring and Zstring with UDTs
Replies: 35
Views: 1849

Re: Extending Wstring and Zstring with UDTs

Thanks, fxm.

To avoid some complexity in the wiki topics, I was think of adding pages for
KeyPgExtendsWstring
KeyPgExtendsZstring
to give a separate treatment of the usage.

Then only linking (brief mention) from:
Type
Extends
Wstring
Zstring
by coderJeff
Jun 23, 2019 20:25
Forum: Documentation
Topic: Compiler option: -w
Replies: 6
Views: 260

Re: Compiler option: -w

Cosmetically, it would be nice to rebase the warning numbers to zero. It would change the meaning of '-w' option and numbers of warnings, but output would look nicer. From: Re: Free Basic Compilers Version 1.06.0 (08-26-2018) seem broken One thing I would still like to fix, is that internally, '-w a...
by coderJeff
Jun 23, 2019 20:17
Forum: Community Discussion
Topic: How to do -g but without assertions?
Replies: 20
Views: 1977

Re: How to do -g but without assertions?

I think I have a simple solution: Let's think of __FB_DEBUG__ as refering to "adding debug code to the program" (which could be assertions, or any other code added for debugging purposes). Then -g can stay as-is (enabling __FB_DEBUG__, assertions, and -debuginfo). It probably doesn't make...
by coderJeff
Jun 23, 2019 20:08
Forum: Community Discussion
Topic: How to do -g but without assertions?
Replies: 20
Views: 1977

Re: How to do -g but without assertions?

Also, it would be nice if you could get bounds/nullptr/rtlib checking but without the overhead of 4 calls to fb_ErrorSetModName/fb_ErrorSetFuncName in every single function? Those calls are a huge overhead in small inlined functions, which might otherwise compile to just a few instructions. The lin...
by coderJeff
Jun 23, 2019 19:49
Forum: Community Discussion
Topic: How to do -g but without assertions?
Replies: 20
Views: 1977

Re: How to do -g but without assertions?

I modified my original plan and have created pull request New command line options for control over debug code generation #154 for: '-earray' enable array bounds error checking '-eassert' enable asserts error checking '-edebug' enable __FB_DEBUG__ '-edebuginfo' enable...
by coderJeff
Jun 23, 2019 19:37
Forum: Community Discussion
Topic: How to do -g but without assertions?
Replies: 20
Views: 1977

Re: How to do -g but without assertions?

On the other hand, it looks like there would be little to add to the current -v and -version to display the new possible options. Maybe just mod -version and -v only? Simplest choice. I think so too. '-v' option has always meant 'be verbose', so I think it's fair to use it for more detailed informa...
by coderJeff
Jun 18, 2019 2:30
Forum: Community Discussion
Topic: Extending Wstring and Zstring with UDTs
Replies: 35
Views: 1849

Re: Extending Wstring and Zstring with UDTs

We see the same problem with the USTRING aka DWSTR type where fbc's implicit STR conversions cause loss of wide characters. José solved this issue in his wide string classes user code by overloading the dereference operator to get a WSTRING ptr (which I thought was a clever use of the operator) . He...
by coderJeff
Jun 18, 2019 2:20
Forum: Community Discussion
Topic: Extending Wstring and Zstring with UDTs
Replies: 35
Views: 1849

Re: Extending Wstring and Zstring with UDTs

Before getting too elaborate with the examples, I'll post a couple small examples to try and the difference between standard UDT and the new 'UDT extends wstring' One of the original issues is that fbc implicitly casts UDT's to a STRING type for quirk string functions. This is a problem for wstring ...
by coderJeff
Jun 18, 2019 2:10
Forum: Community Discussion
Topic: Extending Wstring and Zstring with UDTs
Replies: 35
Views: 1849

Re: Extending Wstring and Zstring with UDTs

@coderJeff, Can you provide an example of these new features, using for example 'Extends Zstring'? Yeah, an 'Extends Zstring' example won't be of much interest yet. Because fbc prefers conversions to (ascii) zstring/string anyway, 'extends zstring' isn't much different than the UDT capability we al...
by coderJeff
Jun 16, 2019 18:43
Forum: Documentation
Topic: Wiki improvements
Replies: 335
Views: 24218

Re: Wiki improvements

I think the main point of bug report #832 was that fbc should error on suffixes used where they shouldn't be, like on keywords. However, this is still allowed by fbc (even with the "fix"): #lang "fblite" if$ 1 then% print! end if For other use of suffixes in "-lang fb",...
by coderJeff
Jun 16, 2019 18:11
Forum: Community Discussion
Topic: Extending Wstring and Zstring with UDTs
Replies: 35
Views: 1849

Re: Extending Wstring and Zstring with UDTs

Add changes for SWAP , SELECT , and IIF IIF(expr, ture-expr, false-expr) uses a similar approach as SWAP . If one or the other is a UDT that can be converted to Z|WSTRING, it will do so, otherwise, no conversion and normal IIF logic remains. This feature pull request user defined types can e...
by coderJeff
Jun 09, 2019 23:58
Forum: Documentation
Topic: Wiki improvements
Replies: 335
Views: 24218

Re: Wiki improvements

My comments so far are only about changing the meaning of the array descriptor structure. We still need to do something with it, generating different code in the compiler and/or implementing different behaviour in the rtlib. So maybe will have other new bugs or crashes not yet realized due to linkin...
by coderJeff
Jun 09, 2019 23:39
Forum: General
Topic: Squares
Replies: 6659
Views: 377032

Re: Squares

It is impossible to figure out. This will be true for all combinations of bit patterns (dictionary), where at least one bit pattern (word) forms the beginning of another bit pattern (word). In your case using 0, 01, 10, 11, the "0" can be found at the beginning of "01", so there ...
by coderJeff
Jun 09, 2019 17:45
Forum: Documentation
Topic: Wiki improvements
Replies: 335
Views: 24218

Re: Wiki improvements

JK, you have the right ideas. Regardless, it's still a binary compatibility break. It's probably not as bad as I make it out to be, that's just the attitude I must have going in to it, preparing users for the worst. fbc itself, IIRC, mostly static arrays are used like lookup tables. There are a few ...
by coderJeff
Jun 09, 2019 15:48
Forum: Documentation
Topic: Wiki improvements
Replies: 335
Views: 24218

Re: Wiki improvements

Fix for #893 Typo in error message 148 is now merged in to fbc/master. Thanks, fxm. Do you mind having a look at: #455 Number lexing allows much bad input #491 precision denotation suffix char returns syntax error I think parts of those bug reports could be resolved by verifying or adding to documen...

Go to advanced search