Search found 9106 matches

by fxm
Sep 18, 2019 17:54
Forum: General
Topic: ReDimming a Shared array
Replies: 5
Views: 180

Re: ReDimming a Shared array

I prefer to use:
Common Shared As datatype Array(Any)

Instead of sharing the address of the first element, it is better to share the address of the array descriptor (constant address), which makes it possible to resize the array from any module.
by fxm
Sep 18, 2019 12:58
Forum: General
Topic: ReDimming a Shared array
Replies: 5
Views: 180

Re: ReDimming a Shared array

I have, for example Dim Shared array(1 to 32) As Wstring * 256 ...... [1] As above declared, your array is a fix-len array (because declared "Dim" with integer literals as bounds). To declare a var-len array, but sizing it at same time (with integer literals as bounds), the syntax is: ReD...
by fxm
Sep 18, 2019 6:11
Forum: Documentation
Topic: Wiki improvements
Replies: 352
Views: 36607

Re: Wiki improvements

About the "Programmer's Guide / Procedures / Procedure Scopes" page - Is the purpose of describing the scope of variables within a procedure? In this case, already covered by "Programmer's Guide / Declarations / Variable Scope" page. - Or to speak about the visibility of the pro...
by fxm
Sep 15, 2019 14:06
Forum: Community Discussion
Topic: fb 1.07 tests
Replies: 51
Views: 4480

Re: fb 1.07 tests

fxm wrote:Maybe forgotten by the developers themselves!
But I agree to leave that in this state.
So everyone can decide how safe he is when he codes.
coderJeff wrote:Yes, It's true! I forget about peek & poke.

Forget Peek and Poke again very quickly!
This present behavior is fine for me.
by fxm
Sep 14, 2019 20:39
Forum: Tips and Tricks
Topic: UDT_timer_thread (public methods and private thread-sub)
Replies: 3
Views: 756

Re: UDT_timer_thread (public methods and private thread-sub)

UDT_timer_thread overview: Only 4 member procedures in public access (the first 3 returning '1' if success, '0' else): - Function 'Set' to parametrize the considered timer (time-out in ms, pointer to user Sub procedure) - Function 'Start' to start the considered timer - Function 'Stop' to stop the ...
by fxm
Sep 12, 2019 20:18
Forum: Documentation
Topic: Wiki improvements
Replies: 352
Views: 36607

Re: Wiki improvements

@admin,

About 6 months ago, I proposed to close this bug report (which I had created myself), but no reaction since?
#807 'ScreenSet' ordering in main thread is ignored by user threads even created after that!
by fxm
Sep 12, 2019 15:09
Forum: Community Discussion
Topic: fb 1.07 tests
Replies: 51
Views: 4480

Re: fb 1.07 tests

Another example where type conversion control is even more rigorous: Type UDT Extends Object End Type Dim As UDT u Print @u Print 'Print Cast(Integer Ptr, @u) '' error 302: Casting derived UDT pointer to incompatible pointer type Print Cast(Integer Ptr, Cast(Any Ptr, @u)) '' OK Print @Peek(Integer, ...
by fxm
Sep 12, 2019 13:51
Forum: Community Discussion
Topic: fb 1.07 tests
Replies: 51
Views: 4480

Re: fb 1.07 tests

And this (though you will get a warning if compiled with '-w constness' option): sub proc1( byref s as string ) end sub sub proc2( byref s as const string ) proc1( cast(string, s) ) end sub The less well-known Peek instruction is less impacted by such warnings: sub proc1( byref s as string ) end su...
by fxm
Sep 12, 2019 8:14
Forum: Documentation
Topic: Wiki improvements
Replies: 352
Views: 36607

Re: Wiki improvements

This is progressing well in my opinion (started since September 2, 2019). Go see it if the above subject interests you ! New complete sub-section added in the Programmer's Guide: Multi-Threading Overview Threads Mutual Exclusion Conditional Variables Critical Sections Critical Sections FAQ
by fxm
Sep 12, 2019 7:31
Forum: General
Topic: First try at extended classes
Replies: 5
Views: 193

Re: First try at extended classes

2. The explicit use of base for member access seems wise to me. Else the variables ( mass and radius in this case) are like magic variables and one has to search for the declaration (could be some global variable as well). Any other (disagreeing) opinions on this? When a base field name is not hidd...
by fxm
Sep 12, 2019 7:00
Forum: General
Topic: First try at extended classes
Replies: 5
Views: 193

Re: First try at extended classes

1. I initially used base.constructor(...) instead of base(...) in the extended class. But the manual says it is bad. Talking about corrupt vtable pointers (not sure what that means). It is really bad? If so, why is it allowed and/or should the compiler not give a warning? Indeed it's a bad habit. -...
by fxm
Sep 10, 2019 15:13
Forum: Documentation
Topic: Wiki improvements
Replies: 352
Views: 36607

Re: Wiki improvements

This is progressing well in my opinion (started since September 2, 2019).
Go see it if the above subject interests you !

For the only remaining page "Critical Sections", I already have "material" thanks to my article on the subject.
by fxm
Sep 08, 2019 11:49
Forum: Community Discussion
Topic: any ptr bug?
Replies: 5
Views: 136

Re: any ptr bug?

To access a block of integers with an 'Any Ptr' type pointer pointing to the first element, this pointer ( 'pp' ) must be cast to an 'Integer Ptr' before applying the offset ( 'i' ) but not after (look at the displayed addresses in your code). See also the Programmer'...
by fxm
Sep 08, 2019 5:08
Forum: Community Discussion
Topic: St_W builds
Replies: 7
Views: 282

Re: St_W builds

I do not mind, I've been doing it for years.
To obtain a full working version of fbc (win 32), you must accumulate the loading of the files:
- fbc_win32_mingw_...
- freebasic_additional_headers
- gcc-5.2.0-for-FB-win32-gengcc
(- freebasic_manual)
by fxm
Sep 07, 2019 15:19
Forum: Documentation
Topic: Wiki improvements
Replies: 352
Views: 36607

Re: Wiki improvements

It is missing too, but a complete section on the Multi-Threading (with several pages, for example: "Overview", "Threads", "Mutual Exclusion", "Conditional Variables", "Critical Sections", ...) . But here, a lot of work of synthesis and writing! Even...

Go to advanced search