Search found 262 matches

by TeeEmCee
Mar 01, 2018 22:51
Forum: Tips and Tricks
Topic: gcc extended asm
Replies: 9
Views: 1138

Re: gcc extended asm

It's too bad you have to add the quote marks, newlines and line continuations. fbc should be able to add them automatically, the way it does for -asm intel, but without needing to implement a parser like it has for intel syntax. Something like: function sqrt (byval x as double) as double dim as doub...
by TeeEmCee
Mar 01, 2018 20:55
Forum: Community Discussion
Topic: no warning on missing constructor
Replies: 5
Views: 874

Re: no warning on missing constructor

I don't see the problem. Not defining a constructor is a link-time error. It can't be caught while compiling any individual .bas file, because it could be defined in any other .bas file. So fbc can't print an error message, but the linker did. Although, it's strange that ld didn't demangle the symbo...
by TeeEmCee
Feb 25, 2018 9:11
Forum: General
Topic: dll ?
Replies: 9
Views: 789

Re: dll ?

or has c struct's ? I don't understand the question. But you said this dll is compiled with gcc (code::blocks), right? If so the classes can possibly be used from FB, as caseih said. I think that fbc does support C++ classes with overloaded operators, but that there is a problem just with the const...
by TeeEmCee
Feb 22, 2018 2:42
Forum: General
Topic: dll ?
Replies: 9
Views: 789

Re: dll ?

grindstone: You need to accept cookies. For translating a C header file to a FB one, I recommend using fbfrog . It's almost painless! Just compile fbfrog and run "fbfrog myheader.h" and it'll create a myheader.bi file. But that header contains C++ declarations, which *isn't* part of the li...
by TeeEmCee
Feb 21, 2018 3:04
Forum: Projects
Topic: fbcunit - fbc compiler unit testing component
Replies: 44
Views: 4065

Re: fbcunit - fbc compiler unit testing component

Other CPUs are another thing to consider I'm afraid I haven't tried out your cunit replacement or tested FB on an ARM in a long time, but just want to draw your attention to this relevant commit: commit 06cee30277a9a925e43af41e6d5a81c3410f52b1 Author: Ralph Versteegen <teeemcee@gmail.com> Date: Mon ...
by TeeEmCee
Feb 20, 2018 10:10
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 210
Views: 18346

Re: Pure FB Runtime Library (in progress)

Sorry, haven't been around. Either you can edit the makefile directly, or you can create a config.mk file and place it next to makefile. (Or, you could even pass it on the commandline every time) I definitely recommend config.mk, because that way git won't see any local changes to makefile I have fb...
by TeeEmCee
Jan 20, 2018 0:48
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 210
Views: 18346

Re: Pure FB Runtime Library (in progress)

You did ask before. See https://www.freebasic.net/forum/viewtopic.php?p=237909#p237909 and following replies. To summarise, make these module constructor and destructors: Maybe we should just use ctor/dtor priority 101 for the FB runtime, and disallow users from using priority 101. Then we can avoid...
by TeeEmCee
Jan 18, 2018 10:48
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 210
Views: 18346

Re: Pure FB Runtime Library (in progress)

If ASC is called with a string literal then it can be evaluated at compile-time. Otherwise the call to the runtime has to be preserved. See cStrASC in parser-quirk-string.bas The same thing applies to other string and wstring functions including string concatenation (I'm not sure if all are optimise...
by TeeEmCee
Jan 17, 2018 9:39
Forum: Linux
Topic: How to use vt100 escape sequence for text color
Replies: 10
Views: 1186

Re: How to use vt100 escape sequence for text color

It's because in FB PRINT does not output strings straight to stdout, instead there is a layer of indirection to handle COLOR, POS, etc; it escapes your escape codes so that they won't be interpreted by the terminal.
by TeeEmCee
Jan 13, 2018 9:29
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 210
Views: 18346

Re: Pure FB Runtime Library (in progress)

OK, after building the mt variants I managed to compile fbc-tests (the cunit tests), but it freezes. I tried log-tests, and there are only 6 failures! This was done on my own branch before I merged your work. Wow, you've translated over half the rtlib now. Nice work! I merged our fixes and submitted...
by TeeEmCee
Jan 13, 2018 6:58
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 210
Views: 18346

Re: Pure FB Runtime Library (in progress)

I'm sorry to disappoint you, but you're compiling the testsuite with the wrong copy of libfb, not fbrtlib. FB's testcases (at least the cunit ones) link to libfbmt.a, not libfb.a. Maybe you can run the logtests ones? The makefile I provided doesn't build libfbmt.a, but I'm adding it now. I assure yo...
by TeeEmCee
Jan 13, 2018 5:59
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 210
Views: 18346

Re: Pure FB Runtime Library (in progress)

You haven't checked in the con_print_tty_uni.bas file yet. Anyway, what about warnings? There were quite a lot which indicated mistakes either in the translation, or in FB's CRT headers. Also, too late, I've already nearly fixed everything. (Edit: Imortis, you are too quick to add various casts to s...
by TeeEmCee
Jan 12, 2018 7:47
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 210
Views: 18346

Re: Pure FB Runtime Library (in progress)

I get quite a few errors when I try to compile. Does "fbc -c *.bas" work for you? It doesn't work here. Not all of these are unix-specific problems. I'm currently working on fixing all the errors and warnings. Also, (if I go back to git commit 7b994f739, which compiles on Unix), the make f...
by TeeEmCee
Dec 27, 2017 23:00
Forum: Community Discussion
Topic: tips from a demo coder
Replies: 15
Views: 1207

Re: tips from a demo coder

If you're comparing two floating point numbers for equality, you probably have a bug in your code.

...I had to fix such a bug in my own code just last night :/
by TeeEmCee
Dec 15, 2017 1:56
Forum: Projects
Topic: UTF-8 Variable Length String Library
Replies: 35
Views: 3223

Re: UTF-8 Variable Length String Library

Why did you make this a single .bi file rather than a .bas and .bi pair? Anyone who wants to use it will have to manually split it into two files. You can add support to your project by simply include the BI file (at the top). No need to split the procedures to a separate BAS file. The compiler see...

Go to advanced search