Qbasicnews.com
July 15, 2018, 06:03:30 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: A question on keyword Syntax section  (Read 4948 times)
keeling
Forum Regular
**
Posts: 149



WWW
« on: May 20, 2005, 12:13:27 PM »

OK, I've looked at this a few different ways (look at the page history) and I have to question the way it is now.

Looking at the ABS keyword as an example http://www.freebasic.net/wiki/wikka.php?wakka=KeyPgAbs.

Vic said to include overload operators and gave an example of syntax that looked like
Code:
function ABS (byval number as integer) as integer


That is showing how you would declare it as a new function (if there were no ABS function), but I've always taken syntax to mean how you use it. If you look at VB's, QB's, C, etc documentation it gives it similar to the way I have it now.
Code:
ABS ( number )


And then in the descript go on to say that ABS will take any valid numberic expression....etc etc etc (although a note should be add about if you try to take the ABS of U-data type like UBYTE)

I know this isn't VB or QB or anything other than FB, but we can learn from their examples.

The Question then becomes, should we define the syntax to be 'what it is' (a.k.a. Vic's first example) or the 'way it is used' (a la most other languages documentation style)?

Also, is there going to be a 'result' section under the example section, or will the results of the example just be in the example section (as it is now with the ABS). I noticed that a version of the format tut had this.
Logged
Jofers
Been there, done that
*****
Posts: 1040



WWW
« Reply #1 on: May 20, 2005, 12:23:27 PM »

I didn't write that one, but I think (number) would work, if you add an attribute to the table about what it returns.
Logged
urger
Wandering Guru
***
Posts: 337



« Reply #2 on: May 20, 2005, 12:59:45 PM »

I agree, the ABS ( number ) should do fine, with an explatin in the argumetns secton that number can be any numeric value or any numeric variable type.
Logged

his sig left intentionally blank
keeling
Forum Regular
**
Posts: 149



WWW
« Reply #3 on: May 20, 2005, 02:01:23 PM »

OK, now are we using the format that Vic put up with the FBTags )e.g. the ABS keyword page), or are we using the format that's under the Sample Style Page?

Personally I like the sample style page, but I'm fine with either.
Logged
urger
Wandering Guru
***
Posts: 337



« Reply #4 on: May 20, 2005, 02:18:25 PM »

They are basicly the same style, You could use either, though (as the author of the sample) I like the SampleStyle more Wink
Logged

his sig left intentionally blank
aetherfox
Been there, done that
*****
Posts: 1071



WWW
« Reply #5 on: May 20, 2005, 02:34:59 PM »

No, don't use either.  Stick with one.  I like the sample style page.
Logged

~''i|~thrFx~|i''~-  
avinash.vora - http://www.avinashv.net
v3cz0r
I hold this place together
*****
Posts: 924



WWW
« Reply #6 on: May 20, 2005, 05:32:55 PM »

Well, if it will easier to new users, let's do that way, but the QB-ish declarations will be needed in some cases, when arguments are optional and take some default value, for example.

I prefer everything indented, ie:

Code:
Section Title:
    Section body
    ...

Another Section:
    - Items
    ...


Ctrl+T does the Tabbing magic.

With the KeyPg* and CatPg* pages, let's use no boxes, complex formatting and such, or it will be pain to convert to other formats and to maintain the pages - say if the wiki script is changed later.. who knows.

Other than that, we have to create the CatPg* pages and put the KeyPg* links on them, plus fix the back link at each CatPg.

Each contributor could choose a category and start fixing/adding/changing the KeyPg* pages, it's up to you to decide.

Would be great to have to pages formatted and completed, so a CHM can be generated from them and included in the FBIDE, to add quick-help support.
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!