How can I detect what OS version is running from?

Just starting out? Need help? Post your questions and find answers here.
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

hehe.

You find some really interesting questions by the "old hands" when you search by author.

Whispers: BTW, that OSversion thing is not the most intuitive find in the docs, nor is everything immediately obvious with the PB syntax.
dagcrack
Addict
Addict
Posts: 1868
Joined: Sun Mar 07, 2004 8:47 am
Location: Argentina
Contact:

Post by dagcrack »

True! But I was busy with other stuff atm -_-
dagcrack
Addict
Addict
Posts: 1868
Joined: Sun Mar 07, 2004 8:47 am
Location: Argentina
Contact:

Post by dagcrack »

@Dare2
Yeh I bet.. but I don't want to check out.. I'm afraid I could laugh so hard that someone could kick me cause of that!.
Fred
Administrator
Administrator
Posts: 16664
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Dare2: Could you could give us some hints to improve that ?
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

hmmm... I find OSVersion() to be very straightforward and easy to use..
I had no trouble understanding the documentation on the command either...

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
thefool
Always Here
Always Here
Posts: 5881
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

i also think its easy. Just wondering why it says 60 when the debugger recives the command. Maybe its the constant-number?
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

thefool wrote:i also think its easy. Just wondering why it says 60 when the debugger recives the command. Maybe its the constant-number?
Haven't tried it, but probably, yes...
My guess is that it's a variable flag where it gets bits from.. dunno though, Fred would.. :p

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

dagcrack wrote:@GPI
Why you had to say badwords just for that? :(
rtfm is common tongue in every forum I know and I don't think GPI wanted to insult you. So no harm done, ok? GPI is a fine guy, believe me.

But really, to read the manual is one of the first things you have to do when learning new software. PB is no exception. You don't have to learn it by heart, just read the text diagonal and you will know where to look if you need something.

A nice day to everybody out there
freedimension
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

a warm welcome to all noobs, newbies, wannabees and self perceived experts :-)

(that's a smiley up there :-))

welcome, we're all nice guys (girls? let's not go into gender dyslexia) on this forum, so go easy on eachother

but euh, read the manual makes some sense :-) although i admit i have read it a few times and still screwed up :oops:
( 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... )
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

blueznl wrote:...i admit i have read it a few times and still screwed up :oops:

who hasn't?! :roll:

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
Fred
Administrator
Administrator
Posts: 16664
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

thefool wrote:i also think its easy. Just wondering why it says 60 when the debugger recives the command. Maybe its the constant-number?
What do you mean by 'when the debugger recieve the command' ?
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Fred wrote:Dare2: Could you could give us some hints to improve that ?
Took me a second or several to work out what you were asking. I assume about the PB syntax being not immediately obvious?

If so ...

Briefly, not all the syntax and structuring of PureBasic is immediately obvious, vis-a-vis other basics. Cf Instr v FindString, Gadgetry, ReadFile (to open file) and etc.

No beef with that, but it means expect questions from people beginning with PB, even if there is some experience with other langs. Especially if there is experience with a language where expections and assumptions are imported in.

With the OSversion, for example, could as well be assumed to return a string like "#PB_OS_Windows_2000" if you're not familiar with constants. Sound like a stupid assumption? Maybe it is, but the task of the docs is to clarify, and cover that sort of possible assumption. So a link or cross-reference to an explanation on Constants would be useful.

To improve:

HowTos; Cross-references; Notes on differences; More examples in docs. But that means more docs. More work. :)

Lots of points were covered in the general discussion board on getting docs up. We can continue that here, if desired. Or there. Or let it lie. :)
Disclaimer:
Whilst this was posted with a sincere desire to see PB as a stronger contender within the marketplace, some may find the content offensive or objectionable.

It should be remembered that the opinions posted here are purely my own and do not necessarily reflect the opinions of the PB community as a whole, nor, especially, members of the original inner circle.
:)
Fred
Administrator
Administrator
Posts: 16664
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

If we need to explain what is a constant in every command, the help will become a mess. There are basic rules (explained at the very start of the reference manual) which can't be explained every time you encounter them. I tough it was the name which was wrong, but obviously not. I've added an example to the help file to clarify the use of the command.
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Hi Fred.

I agree re explanation per page.

But turning keywords into hyperlinks that, when clicked, go to the relevant page is reasonable.

With OSversion itself, this is just an eg that happens to be used here, in this thread, in the light of previous posts.

The whisper, BTW, was an aside for those slamming a guy who had made half a dozen posts at most at the time of slamming. Now Gus seems a reasonably robust sort of guy and looks like he can hold his own.

But when an ethusiastic but fragile potential buyer makes a post and gets slammed, you lose a sale. And we all lose out - more successful you are, more we get, and faster.

So it is better the docs do all they can to reduce this loss potential.

Anyhow, I know the docs area is being addressed. I'll shut up.
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

@GPI
Why you had to say badwords just for that? :(
Some Standard "Words":

Code: Select all

AFAIK : as far as i know
BTW: by the way
FAQ(S): Frequently asked question(s)
FUP(2): Floow up (to)
IM([NS]H)O: in my([not so] humble) opinion
LOL: laughing out loud
OT: off topic
Q&A: questions and answers
RTFL: rolling on the floor laughing
RT(F)M: read the (fucking) manual
THX: thanks
TIA: thanks in advance
Freak said, that you should see in the help-file about "osversion()" and then you ask for something, which stand in the help-file.
Post Reply