Provide an internal "user" structure

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Provide an internal "user" structure

Post by Dare2 »

This is perhaps more of a thought more than a wish, however it would be nice.

The concept is that PureBasic has an internal structure that it uses or allocates in useful circumstances.

The structure could contain PB reserved fields, and some user fields, eg:

Code: Select all

Structure PB_Extended_Structure
  PB_Long.l                                    ; Reserved for PureBasic
  PB_Pointer.l
  USER_Long.l                                  ; Available to programmer
  USER_Pointer.l
EndStructure
or whatever naming makes sense.

Circumstances when this could be used would include when PureBasic uses a field in an OS structure for own use. Instead of using the field direct, it uses the field as a pointer to this structure.

This would allow both PureBasic and the user to effectively share fields and would provide a solution for things such as the problem that arose with Get/SetGadgetData.

Hope that made sense. Think it does, and think it provides a solution for any circumstance where there it is possible both PureBasic and the programmer may need to use a limited resource.
@}--`--,-- A rose by any other name ..