OSVersion() -> WindowsVersion()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

OSVersion() -> WindowsVersion()

Post by josku_x »

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.
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

Post by Tranquil »

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.
Tranquil
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

Post by josku_x »

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.
I knew this gets a reply like this. :P But as I said nothing special though :arrow:

Perhaps I should make a request for a *cross-platform* OSVersion(), but I don't need it right know.
MVXA
User
User
Posts: 18
Joined: Tue Feb 22, 2005 11:09 pm
Contact:

Post by MVXA »

OSVersion() on Linux should return the kernel version or name of distro..
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

Post by josku_x »

MVXA wrote:OSVersion() on Linux should return the kernel version or name of distro..
From the helpfile:
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
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Learn how to interpret a sentence in english please. :evil:

MVXA meant in the future when there's PB 4.0 for Linux.
bye,
Daniel
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

Post by josku_x »

DarkDragon wrote:Learn how to interpret a sentence in english please. :evil:

MVXA meant in the future when there's PB 4.0 for Linux.
He didn't say anything from PB4 for linux, that's why I thought he means 'now'
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

It's not because the command is Windows only (for now), than it should be renamed... What's the sens in that ?
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

Post by josku_x »

Fred wrote:It's not because the command is Windows only (for now), than it should be renamed... What's the sens in that ?
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 macro :wink:

Code: Select all

Macro WindowsVersion()
 OSVersion()
EndMacro
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Clearer code? It most certainly doesnt clear up code. Especially with your Macro. That adds 3 more lines...

Btw I wouldnt bother asking for a command to be renamed. Its a useless flood of the feature requests.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

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

:-)
( 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... )
Post Reply