Undocumented Features

Everything else that doesn't fall into one of the other PB categories.
User avatar
C87
Enthusiast
Enthusiast
Posts: 178
Joined: Mon Jul 17, 2017 7:22 am
Location: Cotswolds England

Undocumented Features

Post by C87 »

I wasn't sure where to post this. It is not a Coding issue, Bug, or a Feature Request, so I've gone for Discussion.

The other day from a typo when setting up variables, I came across a series of apparent Constants as follows:
#FD_ACCEPT, #FD_CLOSE, #FD_CONNECT, #FD_ODB, #FD_READ, #FD_SETSIZE, #FD_WRITE
#BLACK, #BLACK_BRUSH, #BLACK_PEN, #BLACKNESS, #BLACKONWWHITE

There are others which I have dropped on before. However, there appears to be no mention of them, or why they exist in HELP or elsewhere. Some others are: #TRUETYPE_FONTTYPE, #TRUNCATE_EXISTING, #IMAGE_BITMAP, #IMAGE_CURSOR, #REFERENCE_BLACK_MAX, #READ_CONTROL, #READ_WRITE....., etc, etc. Hundreds of them it does appear. Also not specifically documented, but within HELP are shown #True (1), #False (0) etc, but only shown within the explanation of Gadgets, not as reserved words. Additionally, the other week I came across a mention of the PureBasic utility PureUnit* in the forums, which resulted in my the discovery of that, plus the DocMaker* and others in the SDK folder. None of these or the Libraries have a mention in HELP.

My point is : When so much time and knowledge has clearly been spent creating these, I cannot understand why it appears there has not been any attempt to mention them. (or is it just me that cannot find them?..........looking and not seeing)

I will say that on the PureBasic website, the Online Documentation is helpful and goes a long way to address Libraries and other aspects.

* these come up in PureBasic Forums but if you didn't know about them, or their names, you'd never find them.
If it's falling over......just remember the computer is never wrong!
User avatar
jacdelad
Addict
Addict
Posts: 2010
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: Undocumented Features

Post by jacdelad »

Many, many of these constants are built-in Windows API constants. They have no use for you unless you use the API. The constants themselves are described in the documentation by Microsoft. Neither copying it (and it may be subject to changes) nor listing them (and the list grows more or less regularly) makes sense to me.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
BarryG
Addict
Addict
Posts: 4174
Joined: Thu Apr 18, 2019 8:17 am

Re: Undocumented Features

Post by BarryG »

C87 wrote: Tue Nov 09, 2021 11:01 amThe other day from a typo when setting up variables, I came across a series of apparent Constants [...] there appears to be no mention of them
Those are Windows API constants, and are mentioned in the manual as predefined constants:

https://www.purebasic.com/documentation ... tants.html

That is, if a constant doesn't start with "#PB_" then they're usually an OS one.

Why aren't they mentioned in detail? For the reason given here in the manual:

https://www.purebasic.com/documentation ... _help.html

It's about 400 MB of data that would need to be included with PureBasic.
User avatar
C87
Enthusiast
Enthusiast
Posts: 178
Joined: Mon Jul 17, 2017 7:22 am
Location: Cotswolds England

Re: Undocumented Features

Post by C87 »

Thanks for that jacdelad & BarryG, never had the need for involvement with Win API in PureB but understand now you've explained it.
If it's falling over......just remember the computer is never wrong!
User avatar
jacdelad
Addict
Addict
Posts: 2010
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: Undocumented Features

Post by jacdelad »

I don't know whether you use Windows or not and how much you know about Windows API, but if you want to its definitely worth digging a bit into it. Windows API allows you a lot of predefined additions to everything, like gadgets: enabling grouping and tileview in listicon gadgets is what caught my eye (like in the windows explorer). Sooner or late r you'll come across this unavoidably. Same with Linux and Mac OS, but I can't help you there.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Post Reply