Search found 3728 matches

by MrSwiss
Apr 10, 2021 17:14
Forum: Community Discussion
Topic: FreeBASIC 1.07 Release Discussion
Replies: 81
Views: 16130

Re: FreeBASIC 1.07 Release Discussion

Lazy, I guess. <-> It adds about 8 or 10 hours to what I need to do right now. Isn't that a contradiction in itself ;-)) I fully understand, that you don't want to waste such considerable chunk of time. Thanks again, for your efforts. Finally, I am going to press forward with a 1.08.0 release just ...
by MrSwiss
Apr 10, 2021 16:47
Forum: Community Discussion
Topic: FreeBASIC 1.07 Release Discussion
Replies: 81
Views: 16130

Re: FreeBASIC 1.07 Release Discussion

Just interested in: why not calling it 1.07.4, in order to avoid ambiguities?
Reason:
we currently have 1.07.3 on WIN64 already.
by MrSwiss
Apr 10, 2021 12:17
Forum: Community Discussion
Topic: FreeBASIC 1.08 Development
Replies: 316
Views: 32899

Re: FreeBASIC 1.08 Development

Does this need to be corrected? No, this is the definition that is more 'general' than coderJeff's which is, as stated 'ptr' specific. This means: it throws 'warnings' when used with Integer (any size) or Boolean types. The 'general' version doesn't throw those 'warnings' see my "proof of conc...
by MrSwiss
Apr 09, 2021 19:47
Forum: Game Dev
Topic: a roguelike game converted from cpp to FB
Replies: 17
Views: 486

Re: need help coding a roguelike game

ron77 wrote:seemed that _levelData() array was being out of bound

You can also use: -exx (compiler switch) on CLI/IDE, to detect such things ...

Btw: sometimes, time is better spent reading FB-documentation, than just chatting away ...
by MrSwiss
Apr 09, 2021 19:41
Forum: Community Discussion
Topic: FreeBASIC 1.08 Development
Replies: 316
Views: 32899

Re: FreeBASIC 1.08 Development

If I'm guessing correctly ... just "syntactic sugar" like below: ' NULL-test1.bas -- (c) 2021-04-09, MrSwiss #Ifndef NULL ' prevent 'duplicate definition' error #Define NULL 0 ' NOTE: just 'syntactic sugar' #EndIf ' NULL ' end-prevent ... ' ===== proof of concept ===== Dim As Boolean flag ...
by MrSwiss
Apr 09, 2021 16:14
Forum: Game Dev
Topic: a roguelike game converted from cpp to FB
Replies: 17
Views: 486

Re: need help coding a roguelike game

Hello ron77,

I'm not into C++ otherwise, I wouldn't be sticking around here ;-)
Sadly my interests are outside of games, generally.

Advice: use a Debugger in order to solve such errors, see: FB debugger : 2.98.1 32/64 BIT ..... (2021/01/30) made by member SARG.
by MrSwiss
Apr 09, 2021 15:54
Forum: Game Dev
Topic: a roguelike game converted from cpp to FB
Replies: 17
Views: 486

Re: need help coding a roguelike game

Without looking at the code (original C++) I'm pretty certain, that all your Integer 's are not correct. C/C++ int is NOT = Integer C/C++ int is = Long (in FB) This may or not make a difference ... also see: FB's numeric data-type(s) read all 4 posts (currently) Remark: Declare(d) CTOR/DTOR must be ...
by MrSwiss
Apr 09, 2021 1:45
Forum: Tips and Tricks
Topic: FB's numeric data-type(s)
Replies: 3
Views: 655

Re: FB's numeric data-type(s)

Hi dodicat You missed out boolean. Yes, correct but I consider it a 'hybrid data-type' (not strictly numeric only). Since, if we simply state Print flag when flag dim(med) as Boolean the return is: either true or false which is the respective Const 'identifier' (aka: name). What i mostly dislike in ...
by MrSwiss
Apr 08, 2021 22:52
Forum: Beginners
Topic: Exiting from ASM
Replies: 7
Views: 258

Re: Exiting from ASM

That is pretty simple (as in other block statements):

Code: Select all

Asm
    ' ...
End Asm
There isn't anything like Exit Asm currently (FBC 1.07.n).
by MrSwiss
Apr 08, 2021 15:31
Forum: Tips and Tricks
Topic: FB's numeric data-type(s)
Replies: 3
Views: 655

Re: FB's numeric data-type(s)

Here is a addendum to above which explains how U/Integer data-types can be defined. In order to do so they must be #undef (undefined) first. The whole exercise is pretty usless except for DEMO-PURPOSE (educational info). ' (c) 2021-04-08, MrSwiss ' delete Integer and UInteger data-types #Undef Integ...
by MrSwiss
Apr 06, 2021 17:50
Forum: General
Topic: Infinite loop UBYTE For loop index problem?
Replies: 12
Views: 275

Re: Infinite loop UBYTE For loop index problem?

Since "i" is a variable of unsigned byte type, it can range from 0 to 255, so it is always "smaller or equal to 255"
The DO .. LOOP example is clearly causing the same result: 'endless loop', due to 'overflow' of UByte.
255 + 1 = 0 ...
by MrSwiss
Apr 06, 2021 17:36
Forum: General
Topic: Infinite loop UBYTE For loop index problem?
Replies: 12
Views: 275

Re: Infinite loop UBYTE For loop index problem?

CBruce wrote:Shouldn't I be able to use a UBYTE as an index in a For loop of 0 to 255?
No, maximum is max. - 1 (254).

'' Works fine if I limit it to 254."
The reason is that, NEXT checks on max. + 1, which causes an 'overflow' to 0 (zero).
This in turn generates the 'endless-loop' ...
by MrSwiss
Apr 05, 2021 23:03
Forum: Hardware Interfaces / Communication
Topic: Controlling transistors via usb
Replies: 5
Views: 314

Re: Controlling transistors via usb

@admin and/or @moderator, maybe just move this post and then delete this thread (duplicate) of programming/beginners. Maybe I should have posted it under "Hardware Interfaces / Communication" section of the forum. I start this thread in the right section this time I hope. It is worse to du...
by MrSwiss
Apr 05, 2021 21:39
Forum: Beginners
Topic: Execution speed of nested loops
Replies: 24
Views: 504

Re: Execution speed of nested loops

Lets face it that, before thinking about code improvements for speed are made: - using a testcode that produces *reliable results (*correct time taken). The current testcode produces nonsense because it doesn't really compare properly. ⋅ includes unwanted 'loop timing' (time taken by i, j ...
by MrSwiss
Apr 05, 2021 17:56
Forum: General
Topic: Bresenham thick line code
Replies: 3
Views: 371

Re: Bresenham thick line code

UEZ wrote:It's time that the FB GFX lib will be upgraded to a modern one...
That is far easier said then done ...

There is always that lang "qb" issue, where a U/Integer = 16 bit.

I'd probably use CAIRO library for 2D graphics (OS independent).

Go to advanced search