Search found 9168 matches

by fxm
Oct 22, 2019 19:34
Forum: Community Discussion
Topic: How to add new features? (syntax, user API)
Replies: 4
Views: 167

Re: How to add new features? (syntax, user API)

I do not see any fundamental differences with a classic namespace usage:
array.sort(<parameters>)
array.insert(<parameters>)
array.delete(<parameters>)
result = array.scan(<parameters>)
.....

idem for
audio.xxx()
audio.yyy()
audio.zzz()
.....
by fxm
Oct 22, 2019 14:17
Forum: General
Topic: Quick question on Enum's data type
Replies: 19
Views: 363

Re: Quick question on Enum's data type

MrSwiss wrote:fxm, what you call a "typo", I'd call it a "Logical Error", for technical correctness.

My hand did not follow my thought (a micro sleep)!
by fxm
Oct 22, 2019 13:27
Forum: General
Topic: Quick question on Enum's data type
Replies: 19
Views: 363

Re: Quick question on Enum's data type

In the constructor body: This.Shape = CLng(rhs) CLng is NOT mandatory because instead with: This.Shape = rh the compiler declared with one parameter (already called "conversion constructor") applies the good implicit conversion because Shape is declared "As Long". Excuse...
by fxm
Oct 22, 2019 11:40
Forum: General
Topic: Quick question on Enum's data type
Replies: 19
Views: 363

Re: Quick question on Enum's data type

Others. Am I missing something here? Why are you using constructors? Just to avoid the mandatory parentheses otherwise: dim as block b=(shapes.circle) shortcut for: dim as block b=Type<Block>(shapes.circle) In the constructor body: This.Shape = CLng(rhs) CLng is mandatory be...
by fxm
Oct 22, 2019 5:52
Forum: General
Topic: Quick question on Enum's data type
Replies: 19
Views: 363

Re: Quick question on Enum's data type

Or else, from the MrSwiss's post, a nested Enum in a Type containing a Long: Type Block Enum Shapes circle = 1 square triangle End Enum As Long Shape Declare Constructor() Declare Constructor(ByVal rhs As Block.Shapes) End Type Constructor Block() End Constructor Constructor Block(ByVal rhs As Block...
by fxm
Oct 21, 2019 21:46
Forum: General
Topic: Quick question on Enum's data type
Replies: 19
Views: 363

Re: Quick question on Enum's data type

Under the hood, Enum contains an hidden Integer field (corresponding of the value of the Enum instance), so that the size of an Enum will be always that of an Integer (no matter how many defined symbols are just declarations for the compiler assignation). In FreeBASIC, an Enum instance can be implic...
by fxm
Oct 21, 2019 14:27
Forum: Beginners
Topic: Calculating intersection points
Replies: 8
Views: 256

Re: Calculating intersection points

Your request is still not clear to me.
by fxm
Oct 19, 2019 19:08
Forum: Documentation
Topic: RGB and RGBA
Replies: 5
Views: 131

Re: RGB and RGBA

But if we swap the order of tests in the code (first, Ulong), Ulong becomes faster!
by fxm
Oct 19, 2019 13:46
Forum: General
Topic: YouTube increases FreeBASIC performance (solved)
Replies: 5
Views: 148

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).
by fxm
Oct 19, 2019 9:20
Forum: Documentation
Topic: RGB and RGBA
Replies: 5
Views: 131

Re: RGB and RGBA

dkl's answer in 2015 on the same question about the FB 1.02 release (https://www.freebasic.net/forum/viewtopic.php?p=206790#p206790): Does the macros RGB and RGBA are changed too ? So far they're still using UInteger; but yea, it might be useful to change them to ULong. That must have been forgotten...
by fxm
Oct 16, 2019 5:17
Forum: Community Discussion
Topic: FreeBASIC 1.08 Development
Replies: 93
Views: 2808

Re: FreeBASIC 1.08 Development

However, that is allowed:

Code: Select all

For i As Integer = 1 to MyUdt.Limit

   'Do whatever
   
Next
by fxm
Oct 12, 2019 15:34
Forum: Tips and Tricks
Topic: UInteger to max. value (32/64)
Replies: 4
Views: 373

Re: UInteger to max. value (32/64)

MrSwiss wrote:

Code: Select all

Dim As UInteger  UImax = Not 0   ' preferred method

This is Not False and True :-)

Code: Select all

Dim As UInteger  UImax1 = Not False
Dim As UInteger  UImax2 = True
by fxm
Oct 10, 2019 18:51
Forum: General
Topic: With End With confusion.
Replies: 2
Views: 164

Re: With End With confusion.

Extract of documentation on 'With...End With' : Internally, a reference to the variable is taken at the start of the With block, and then is used to calculate any element accesses within the block. (the reference to the variable is not automatically reevaluated for each use, but only once at...
by fxm
Oct 08, 2019 9:54
Forum: General
Topic: (Solved) Howto print & draw from own library's Subs/Funcs ?
Replies: 14
Views: 484

Re: Howto print & draw from own library's Subs/Funcs ?

@admins and @developers,

This method (my code above) seems a little twisted, because the main program and the DLL work in their own graphical environment, but all this to result in a single graphical window.

What is your advice on this?
by fxm
Oct 08, 2019 4:52
Forum: General
Topic: (Solved) Howto print & draw from own library's Subs/Funcs ?
Replies: 14
Views: 484

Re: Howto print & draw from own library's Subs/Funcs ?

I got message "Segmentation fault" - error 139, seems causes by graphicScreen(), or DyLibFree(library) line in your "main.bas". No problem for me in Win32 and Win64. But you can try to delete 'DyLibFree (library)' which is not mandatory at the end of the main cod...

Go to advanced search