Search found 400 matches

by mrToad
Jan 02, 2020 17:05
Forum: Libraries
Topic: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)
Replies: 70
Views: 20164

Re: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)

Come on we all and I help you for free, what's going on my friend ? But please don't give me the right answer for this fundamental sentence ! [...] I'm sure the current rate of [universe] expansion let us handle your questions. Dr. Prof. D.J.Peters :lol: Joshy This is one of those funny & smart...
by mrToad
Dec 06, 2019 19:12
Forum: General
Topic: Checking if an array is empty.
Replies: 5
Views: 260

Re: Checking if an array is empty.

Thank you fxm. If the array is not empty and if the index value 0 is not within the valid limits of the array, we get: [...] a runtime error for a dynamic array, I don't get any runtime error: Dim As Integer a() ReDim a(10 To 20) '' Comment to alter results. Print "Check method 1:" If @a(0...
by mrToad
Dec 06, 2019 17:25
Forum: General
Topic: Checking if an array is empty.
Replies: 5
Views: 260

Checking if an array is empty.

I noticed in the documentation: '' determining whether an array is empty Dim array() As Integer Print "lbound: "; LBound( array ), "ubound: "; UBound( array ) '' 1 and 0 If LBound( array ) > UBound( array ) Then Print "array is empty" Else Print "array is not empty...
by mrToad
Nov 16, 2019 21:59
Forum: General
Topic: Ptr to an array? (Was: Possible to ReDim with only a ptr?)
Replies: 10
Views: 643

Re: Ptr to an array? (Was: Possible to ReDim with only a ptr?)

Maybe mrToad needs to be able to pass an array to a procedure using a pointer only as argument. Yes, that's what I feel I need to do, exactly! It's nice to see that it's now possible to point to an array descriptor in 1.08! (Although I didn't find the download yet; I'll try your code suggestion for...
by mrToad
Nov 16, 2019 1:20
Forum: General
Topic: GCC compile delay on large projects?
Replies: 14
Views: 4190

Re: GCC compile delay on large projects?

@coderJeff, that insight really does help explain things.

I'm not sure where in my project there are heavy Data statements though, maybe tucked away in an old attached lib, I will look. I don't care for them anyway, but it's nice to understand the problem. Thanks for your reply.
by mrToad
Nov 16, 2019 1:09
Forum: General
Topic: Ptr to an array? (Was: Possible to ReDim with only a ptr?)
Replies: 10
Views: 643

Re: Possible to ReDim with only a ptr?

Thanks both of you. I didn't think so, but I imagined maybe, by backing up in memory to the first element and using SizeOf to reach the header or something. It's fine to confirm that it's not possible. :) @angros47, thanks, I am familiar with that method, and it is best in most cases. The real reaso...
by mrToad
Nov 13, 2019 16:51
Forum: General
Topic: Ptr to an array? (Was: Possible to ReDim with only a ptr?)
Replies: 10
Views: 643

Ptr to an array? (Was: Possible to ReDim with only a ptr?)

I've never done something like this so I was wondering if it's even possible. ReDim an array with only a pointer to it? Type udt As Long x End Type Sub test(a As udt Ptr = 0) If a Then Print a[0].x ReDim Preserve @a(1 To 10) '' This is obviously wrong, but is it possible to code somehow? Print a[0]....
by mrToad
Oct 25, 2019 16:44
Forum: General
Topic: Quick question on Enum's data type
Replies: 33
Views: 1202

Re: Quick question on Enum's data type

One thing that comes to mind now, I don't think FB had as much capability for object oriented coding back when I made that GUI. It all depends when you have coded your GUI. Yea, I couldn't remember before. Now I found that I posted the original version in 2010: https://www.freebasic.net/forum/viewt...
by mrToad
Oct 25, 2019 16:22
Forum: General
Topic: YouTube increases FreeBASIC performance (solved)
Replies: 6
Views: 361

Re: YouTube increases FreeBASIC performance (solved)

That's why I still have a reluctance to use SLEEP with a value <15 ms (under Windows), because the actual value applied may depend on the context (timeBeginPeriod()/timeEndPeriod() not multitasking safe). After I read this I went and tested something: If Sleep(16,1) gives right around a desired 60 ...
by mrToad
Oct 25, 2019 15:43
Forum: General
Topic: Quick question on Enum's data type
Replies: 33
Views: 1202

Re: Quick question on Enum's data type

I don't remember if there's a formal word for UDT items ... The word you are looking for, is: type member ... Thank you. That will help me sound less confusing. @fxm, That's right, of course. I recall Properties from Visual Basic. I used to code VB for years and later the word Properties got into m...
by mrToad
Oct 24, 2019 15:55
Forum: General
Topic: GCC compile delay on large projects?
Replies: 14
Views: 4190

Re: GCC compile delay on large projects?

@srvaldez, GCC : 522kb (~6 seconds wait to finish compile to exe) GCC -Wc -O3 : 489kb (~10 seconds wait to finish compile to exe) GAS: 423kb (~1 second wait to finish compile to exe) @dodicat, I tested that code, it took a couple minutes for a 640x480 bitmap. Wow, interesting, very slow. I found ~10...
by mrToad
Oct 24, 2019 15:29
Forum: General
Topic: Quick question on Enum's data type
Replies: 33
Views: 1202

Re: Quick question on Enum's data type

I was just referring to the way I was originally doing it. Type Block Enum Shapes circle = 1 square triangle End Enum As Shapes Shape End Type This above UDT has not the same size when compiled in 32-bit/64-bit (4-byte/8-byte). Yes, exactly, that's what I mean. Sorry, the way I wrote the last messa...
by mrToad
Oct 24, 2019 15:12
Forum: General
Topic: Quick question on Enum's data type
Replies: 33
Views: 1202

Re: Quick question on Enum's data type

fxm wrote:Such a UDT has the same size when compiled in 32-bit and 64-bit:
I was just referring to the way I was originally doing it.

Code: Select all

Type Block
Enum Shapes
   circle = 1
   square
   triangle
End Enum
   As Shapes Shape
End Type
by mrToad
Oct 24, 2019 14:50
Forum: General
Topic: Quick question on Enum's data type
Replies: 33
Views: 1202

Re: Quick question on Enum's data type

Since the thread question has already been satisfied and beyond, I just want to say first that it's totally fine with me to open it up to anything else you guys want, so keep posting whatever comes to your mind :) I've been learning from the discussion. You talk about a largish UDT (how big really?)...
by mrToad
Oct 24, 2019 13:28
Forum: General
Topic: Quick question on Enum's data type
Replies: 33
Views: 1202

Re: Quick question on Enum's data type

A pretty interesting discussion has been struck up here. First, thanks for the solutions earlier all of you. I can make use of the code for sure. So long as you remember that on retrieving any file udt data (using enum) you must use integer<32> ~ long. Well, the problem is trying to avoid separate c...

Go to advanced search