OS specific constants documentation?
OS specific constants documentation?
Is there anywhere a documentation of the OS specific constants like #PS$ (Path separator)
I konw there are some OS specific constans but without a central documentation I could not use because I'm not able to find it!
I tried a search for #PS$ in the PB-Help and here in the Forum. But there is no result showing a definition of all possible OS specific constants!
I konw there are some OS specific constans but without a central documentation I could not use because I'm not able to find it!
I tried a search for #PS$ in the PB-Help and here in the Forum. But there is no result showing a definition of all possible OS specific constants!
Re: OS specific constants documentation?
Hello,SMaag wrote: Is there anywhere a documentation of the OS specific constants like #PS$ (Path separator) [...]
This information is usually given in the instruction help.
I don't know if there are many specific cases like #PS$.
Maybe it can help, you can click on the "History" link in the manual and do a search on the word "constant".
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
Except on this sentence...
Re: OS specific constants documentation?
Have you tried the Structure Viewer tool? It doesn't just show structures...
Using the built-in Tools
Using the built-in Tools
Re: OS specific constants documentation?
The closest list would be this -> https://www.purebasic.com/documentation ... tants.html
But that's only for constants starting with #PB_, which is why #PS$ is not in there.
But that's only for constants starting with #PB_, which is why #PS$ is not in there.
Re: OS specific constants documentation?
In my reply, I had thought of including this link but it doesn't 1) list constants of type #PS$ and 2) specify, when they target a specific OS, which one is concerned.BarryG wrote: But that's only for constants starting with #PB_, which is why #PS$ is not in there.
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
Except on this sentence...
Re: OS specific constants documentation?
This manual topic shows which commands are specific to a certain OS -> https://www.purebasic.com/documentation ... cific.htmlSMaag wrote: Tue Jul 16, 2024 8:09 pmthere is no result showing a definition of all possible OS specific constants
So you'd be able to look at each command and see which OS-specific constants they use (if any). Does that help?
Note: I don't think PureBasic has OS-specific constants anyway. For example, #PS$ can be used on all Operating Systems.
Re: OS specific constants documentation?
I think they meant constants that have a different value depending on platform, for example #PS$ would be "\" on Windows and "/" on Mac/Lin.BarryG wrote: Tue Jul 16, 2024 10:37 pm Note: I don't think PureBasic has OS-specific constants anyway. For example, #PS$ can be used on all Operating Systems.
There are platform-specific constants, but they're only used in the API functions, like #MAX_PATH for the Windows API
Re: OS specific constants documentation?
There are!BarryG wrote: Note: I don't think PureBasic has OS-specific constants anyway. For example, #PS$ can be used on all Operating Systems.
Some examples:
#PB_Button_MultiLine supported on Windows & Linux but not on MacOS
#PB_FontRequester_Effects is Windows only
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
Except on this sentence...
Re: OS specific constants documentation?
Thanks, boddhi. I stand corrected and TIL. 
Re: OS specific constants documentation?
First thanks to all! Yes I know all this documentation you gave me as link!
I know and use the buildin tools for structure and constants.
What I see in the answers is: Os specific constans is like a deep secret!
How should we search for this OS specific constans if we don't know the names:
As an example the #PS$: Os specific PathSeparator
(if I look in the Structure viewer I can see only the value on my OS not for other OS)
I request a list of all this OS specific constants with their full names and the values on the different OS.
If this is not existing we should make this list for us! If we have this list, we should request to integrate it into PB help!
I know and use the buildin tools for structure and constants.
What I see in the answers is: Os specific constans is like a deep secret!
How should we search for this OS specific constans if we don't know the names:
As an example the #PS$: Os specific PathSeparator
(if I look in the Structure viewer I can see only the value on my OS not for other OS)
I request a list of all this OS specific constants with their full names and the values on the different OS.
If this is not existing we should make this list for us! If we have this list, we should request to integrate it into PB help!
Re: OS specific constants documentation?
My resarch result until know
Code: Select all
; OS specific FileSystem constants
; Windows
#PS = 92 ; '\'
#NPS = 47 ; '/'
#PS$ ="\\"
#NPS$ "/"
Re: OS specific constants documentation?
IMHO the reason of these kind of constants is, that we do not have to care about the value behind them.
From my point of view, the constants that cannot be used under all supported OSs should be documented in particular.
Code: Select all
; Linux (according to your research)
#PS = 47 ; '\'
#NPS = 92 ; '/'
#PS$ = "/"
#NPS$ = "\\" ; <- syntax highlighter needs two \ to look correct. Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Re: OS specific constants documentation?
AutoCompletionIDE - there is a file here "\config\AutoCompletionIDE\7-API_Const". There are 1436 constants.
Using CaptureText (made on AutoIt3) I pulled 16222 constants from the IDE window (IDE->Tools->Structure Viewer->Constants)
Using CaptureText (made on AutoIt3) I pulled 16222 constants from the IDE window (IDE->Tools->Structure Viewer->Constants)

