OSVersion() -> WindowsVersion()
OSVersion() -> WindowsVersion()
Hello!
I see that OSVersion() is only for windows and it returns the windows version. So OSVersion() sounds a bit confusing, the user might think it would work for other platforms as well if he doesn't look the helpfile.
So, I think to make more readable and clearer code, the OSVersion() function should be renamed to WindowVersion() or something like that.
Nothing special though.
I see that OSVersion() is only for windows and it returns the windows version. So OSVersion() sounds a bit confusing, the user might think it would work for other platforms as well if he doesn't look the helpfile.
So, I think to make more readable and clearer code, the OSVersion() function should be renamed to WindowVersion() or something like that.
Nothing special though.
I knew this gets a reply like this.Tranquil wrote:Maybe this command is supported on other systems in the near future. Should it be renamed then again!? For me this commandname is clear couse the docs says all.


Perhaps I should make a request for a *cross-platform* OSVersion(), but I don't need it right know.
From the helpfile:MVXA wrote:OSVersion() on Linux should return the kernel version or name of distro..
Syntax
Result = OSVersion()
Description
Returns the OS Version on which the program has been launched. It could help to enabled/disable automatically some features depending of the running OS.
'Result' can be one of the following values:
#PB_OS_Windows_NT3_51
#PB_OS_Windows_95
#PB_OS_Windows_NT_4
#PB_OS_Windows_98
#PB_OS_Windows_ME
#PB_OS_Windows_2000
#PB_OS_Windows_XP
#PB_OS_Windows_Server_2003
#PB_OS_Windows_Future ; New Windows version (not existent when the program was written)
...........
Supported OS
Windows
-
- Addict
- Posts: 2344
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
Perhaps there's no sense in that, but for clearer code? But as I said, nothing special. Just ignore this, I can live with my macroFred wrote:It's not because the command is Windows only (for now), than it should be renamed... What's the sens in that ?

Code: Select all
Macro WindowsVersion()
OSVersion()
EndMacro
-
- Addict
- Posts: 1648
- Joined: Mon Sep 20, 2004 3:52 pm
- Contact:
not sure, dracflamloc, sometimes it makes sense
eventgadgetid() -> eventgadget, to name just an example, is a change that makes A LOT OF sense in pb4

eventgadgetid() -> eventgadget, to name just an example, is a change that makes A LOT OF sense in pb4

( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )