Search found 1016 matches

by paul doe
Feb 20, 2020 23:22
Forum: Community Discussion
Topic: problem export functiion ()as string
Replies: 1
Views: 42

Re: problem export functiion ()as string

Indeed, it's most likely a bug. Here's some standalone test code: dll-test.bas (the dll to test): function _ text alias "text"( _ byref foo as string ) _ as string export return( "bar:" + foo ) end function And the test code that shows the problem in question: #inclib "dll-t...
by paul doe
Feb 20, 2020 21:47
Forum: Tips and Tricks
Topic: Growing plant in the breeze v0.6
Replies: 4
Views: 131

Re: Growing plant in the breeze v0.6

Really nice. Reminded me a lot of Prune (I love these minimalist yet stylish games).
by paul doe
Feb 12, 2020 12:59
Forum: General
Topic: triangle world try
Replies: 8
Views: 353

Re: triangle world try

@bluatigro: looking good so far! To badidea's sound advice, I'd also add: ⋅ To avoid the 'seams' you get when drawing faces composed of more than two triangles, you need to make your triangle rasterizer support sub-pixel accuracy . ⋅ The 'popping' of the triangles you observe whe...
by paul doe
Feb 11, 2020 11:56
Forum: Community Discussion
Topic: substrings
Replies: 39
Views: 1643

Re: substrings

This is all very interesting, but do you think there is any chance of this notation making it into FreeBasic? Hardly, I'm afraid (although perhaps in the future?...) The best you can do for now is create your own string type: type _ MyString _ extends ZString public: declare constructor() declare c...
by paul doe
Feb 10, 2020 11:02
Forum: General
Topic: ON ERROR GOTO to display problem line
Replies: 52
Views: 1285

Re: ON ERROR GOTO to display problem line

... YOUR SUGGESTIONS: '1) Insert: '#include "fbthread.bi" DONE 'at the beginning of your program. '2) Search in your code the line corresponding to: 'variable = ThreadCreate(@DisplayTime,0) 'then just below, insert the new line: 'Threaddetach(variable) '("variable" being the nam...
by paul doe
Feb 06, 2020 4:01
Forum: General
Topic: Squares
Replies: 7624
Views: 456513

Re: Squares

@Albert: really nice. Can't say I saw one of those, but they do look familiar for some reason... When I was a child, I distinctly remember the time when I was idly looking through the window on a rainy day (a trait shared by many fellow autists) from a couch we had next to it, and I caught a glympse...
by paul doe
Feb 06, 2020 3:33
Forum: General
Topic: Squares
Replies: 7624
Views: 456513

Re: Squares

... Anyway I am in the middle of an argument with so called environment people who want to cut down native woodland and introduce cattle. For once instead of being an armchair moaner I take on the role of activist up against organisations and land owners. These woods are hidden, I have mentioned th...
by paul doe
Feb 03, 2020 19:23
Forum: Beginners
Topic: Possible bug?
Replies: 15
Views: 696

Re: Possible bug?

... I thought I understood how to pass a parameter. From the errors am I getting I guess I don't. ... Here's your code, modified so that it actually compiles: '#lang "fblite" <-- Forget this directive and pretend it was all a bad dream sub _ BuildNumber( _ byref Digit as string, _ byval D...
by paul doe
Feb 03, 2020 11:04
Forum: General
Topic: [SOLVED] Possible bug?
Replies: 4
Views: 218

Re: Possible bug?

So, to wrap up: using function pointers for functions that have names of ASM constructs (sizes, registers, et al) in the global namespace makes the compiler emit correct but invalid code. This is due to fbc (as of v1.07.1) not mangling function names in the global namespace (thus creating symbol nam...
by paul doe
Feb 01, 2020 19:46
Forum: Projects
Topic: Rebus generator
Replies: 10
Views: 441

Re: Rebus generator

Wow. Looking gorgeous ;)
by paul doe
Feb 01, 2020 15:22
Forum: General
Topic: virtual func not overriding
Replies: 7
Views: 163

Re: virtual func not overriding

ah. thanks! i wasn't aware that const would have an effect in such a manner mostly i'm chomping at the bit to get a new ray tracer running. once i'm satisfied i'll *possibly* do away with the shorthand You're welcome. Fair enough, I just don't understand the urge for these obfuscating 'shorthands' ...
by paul doe
Feb 01, 2020 14:48
Forum: General
Topic: virtual func not overriding
Replies: 7
Views: 163

Re: virtual func not overriding

/' -- "fb 1337 h4x.bas" - 2020 Jan 28 - by dafhi -- '/ #undef int #define def #define def int as Integer def sng as single def dbl as double def ac as const def decl declare def func function def prop property def virt virtual def op operator def csr constructor def ret return def float s...
by paul doe
Feb 01, 2020 12:13
Forum: Beginners
Topic: Conversion/computation from integer to single/floating in qb dialect.
Replies: 8
Views: 197

Re: Conversion/computation from integer to single/floating in qb dialect.

I appreciate all your answers. Don't get me wrong, I'm just a beginner, but sincerely I don't like things like 100.0 or 100! cause they are "unmathematical", prone to be forgotten, and they make the programs harder to understand for non-experts or for future observers. ... All compilers s...
by paul doe
Feb 01, 2020 12:12
Forum: Beginners
Topic: Conversion/computation from integer to single/floating in qb dialect.
Replies: 8
Views: 197

Re: Conversion/computation from integer to single/floating in qb dialect.

jj2007 wrote:Perhaps the best solution is to get rid of #lang "qb".
...

Or even better, get rid of the #lang directive completely.
by paul doe
Jan 31, 2020 16:41
Forum: Beginners
Topic: Conversion/computation from integer to single/floating in qb dialect.
Replies: 8
Views: 197

Re: Conversion/computation from integer to single/floating in qb dialect.

Or alternatively:

Code: Select all

DIM AS INTEGER A
DIM AS SINGLE B
A=1000
B=100! * A
PRINT B
SLEEP

So that FreeBasic augments the expression to single, then assign.

Go to advanced search