Help file - links for constants

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Help file - links for constants

Post by blueznl »

For some features it is hard to find constantes. For example, when you enter Unicode in the search box in the help window, you'll get some Unicode information, but there is no mentioning on that page of the PureBasic unicode constants.

A link on that page to all (related) PureBasic constants would be nice.
( 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... )
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: Help file - links for constants

Post by Kaeru Gaman »

oh... and have a nice day.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Help file - links for constants

Post by Trond »

What do you mean? All constants are listed on the page of the command they can be used with.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: Help file - links for constants

Post by Kaeru Gaman »

... and if you type *unicode* in the search box, the constants side gets listed,
chose it and you'll have all constants containing "unicode" marked.
oh... and have a nice day.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: Help file - links for constants

Post by blueznl »

Kaeru Gaman wrote: ... and if you type *unicode* in the search box, the constants side gets listed,
chose it and you'll have all constants containing "unicode" marked.
Call me stupid (I know I am :-)) but if I type 'Unicode' instead of '*unicode*' I end up on a page telling me what unicode is. Wouldn't it be logical to find a link there towards the unicode related constants?

I think the same thing applies to 'constants'. Type 'constants' in the search box, now tell me, how would a beginner from there find out about 'on board' 'purebasic related' constants?
( 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... )
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Help file - links for constants

Post by Trond »

It still makes no sense. All constants are tied to particular commands and don't make sense without the commands. They are listed with on the commands' pages.

There are no "unicode-related" constants. The constants are all related to particular commands.

Also I think you're confusing search and index.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: Help file - links for constants

Post by blueznl »

Just bear with me. Imagine you are a programmer, a beginner. You're busy coding. You're thinking: darn, I know there's a PureBasic constant related to unicode, now what was it again...

So, you launch the help function, and type 'constants'... or you'd launch the help function and type 'unicode'... In both cases no luck.

Try it. A beginner would be lost, and even experienced users will scratch their head, puzzling where to find what. That's what I mean. It should be easy to find things about expression evaluation and purebasic constants, it should not be a hunt for answers.

Oh well. I've added an additional search pattern to CodeCaddy, using Kaeru's suggestion to include the online PureBasic documentation. Thanks Kaeru (but I still disagree with you on the use of multiline, as per the code below :-))

Code: Select all

  web_underscore = x_readpreferencestringex("web_underscore", _
    "http://google.com/search?q=%keyword%|" + _
    "http://www.google.nl/codesearch?q=%keyword%&hl=en&btnG=Search+Code|" + _
    "http://google.com/search?q=site:purearea.net+%keyword%_|" + _
    "http://google.com/search?q=site:forums.purebasic.com/english+%keyword%_|" + _
    "http://google.com/search?q=site:msdn.microsoft.com/en-us/library+%keyword%" )
  web_other = x_readpreferencestringex("web_other", _
    "http://google.com/search?q=%keyword%|" + _
    "http://google.com/search?q=site:purearea.net+%keyword%|" + _
    "http://google.com/search?q=site:forums.purebasic.com/english+%keyword%" + _
    "http://google.com/search?q=site:www.purebasic.com/documentation+%keyword%" )
Now I only type 'unicode', put the cursor on the word and hit [Alt]+[F1]. Or even better, I type 'constants' and hit [Alt]+[F1].

Still, it should not be necessary to use an external tool like CodeCaddy to do this. In fact, perhaps I should change this into a feature request for the IDE :-) Credit where credit is due: Chi's idea was fantastic, it really simplifies life to have [F1], [Ctrl]+[F1] and [Alt]+[F1] to help me out when I'm stuck!
( 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... )
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Help file - links for constants

Post by freak »

> You're thinking: darn, I know there's a PureBasic constant related to unicode, now what was it again...

Out of curiosity, what constant are you talking about here?

Trond is right. Constants are bound to a specific command. They make no sense on their own. What good is it if you know that #PB_Unicode has *something* to do with unicode? You need a command to pass it to or it makes no sense.

If you just have a constant and want to know the command, there is a list in the manual for that:
http://www.purebasic.com/documentation/ ... tants.html
quidquid Latine dictum sit altum videtur
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: Help file - links for constants

Post by blueznl »

freak wrote: > You're thinking: darn, I know there's a PureBasic constant related to unicode, now what was it again...
Out of curiosity, what constant are you talking about here?
#PB_Unicode
Trond is right. Constants are bound to a specific command. They make no sense on their own. What good is it if you know that #PB_Unicode has *something* to do with unicode? You need a command to pass it to or it makes no sense.

If you just have a constant and want to know the command, there is a list in the manual for that:
http://www.purebasic.com/documentation/ ... tants.html
I'm so happy you agree with me! :-) So, go to the page in the help file about Unicode, and try to figure out how you know if Unicode mode is active or not... good luck :-)
( 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... )
#NULL
Addict
Addict
Posts: 1497
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: Help file - links for constants

Post by #NULL »

you search the list of constants for 'unicode' and you find '#pb_compiler_unicode' which links to 'compilerdirectives' where that question is being anwered.
and if one knows already that he can inquire compileroptions within the code, he will probably look at the compilerdirectives-page directly.

but you are right, on the unicode-page a word about #PB_Compiler_Unicode or a link to 'Compilerdirectives' would not be wrong.

<edit> btw, there's a typo
Compiler Directives - CompilerError wrote:Description
.., or to inform than a source code..
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2137
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: Help file - links for constants

Post by Andre »

#NULL wrote: but you are right, on the unicode-page a word about #PB_Compiler_Unicode or a link to 'Compilerdirectives' would not be wrong.
Done :D

(Added notes and links about the compiler options and compiler directives in the Unicode chapter.)
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Post Reply