Qbasicnews.com

Full Version: Documentiomanary Wiki
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
SJ Zero, you're right. A wiki is a grand idea. However, I am a dinosaur and am no good at setting up such apparatiseseses. If someone could help me out and set up a documentation wiki, I will rename my existing children after you. First born child goes to the first guy that helps me, and the rest middle children. The youngest will still be a boy named "Sue"

Now, I had some pages made, but they're in Atlanta and I'm stuck here in Melbourne, but I did find about 15 minutes to write up a new Table of Contents. I like this better than the last table of contents. More complete:

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<header>
    <id>toc</id>
    <title>Table of Contents</title>
    <author>Joe Antoon</author>
    <description>All indexes and headers</description>
    <layout>toc</layout>
</header>

<content>
    <catagory name="The Compiler">
        <link to="about">About FreeBasic</link>
        <link to="libs">FreeBasic and Libraries</link>
        <link to="fbqb">FreeBasic and QBasic</link>
        <link to="gpl">GPL License</link>
        <link to="using">Using The Command Line</link>
        <link to="changelog">Version Changelog</link>
    </catagory>
    <catagory name="The Language">
        <link to="qbdiff">Differences from QB</link>
        <link to="metacommands">Metacommands</link>
        <group title="Basic Code Blocks">
            <link to="cb_asm">Asm Block</link>
            <link to="cb_data">Data Keyword</link>
            <link to="cb_do">Do Block</link>
            <link to="cb_for">For Block</link>
            <link to="cb_if">If Block</link>
            <link to="cb_select">Select Case Block</link>
            <link to="cb_while">While Block</link>
        </group>
        <group title="Data Types">
            <link to="dt_arrays">Arrays</link>
            <link to="dt_pointers">Pointers</link>
            <link to="dt_standard">Standard Types</link>
            <link to="dt_type">Type Structures</link>
        </group>
        <group title="Operators">
            <link to="op_arithmetic">Arithmetic Operators</link>
            <link to="op_conditional">Conditional Operators</link>
            <link to="op_logical">Logical Operators</link>
            <link to="op_strings">String Operators</link>
        </group>
        <group title="Procedures">
            <link to="proc_functions">Functions</link>
            <link to="proc_goto">Goto Keyword</link>
            <link to="proc_gosub">Gosub Keyword</link>
            <link to="proc_subs">Subroutines</link>
        </group>
    </catagory>
    <catagory name="Runtime Library">
        <link to="runtime_index">Keyword Index<link>
        <group title="Functional Index">
            <link to="run_cl">Command Line</link>
            <link to="run_error">Error Handling</link>
            <link to="run_file">File IO</link>
            <link to="run_math">Mathematical Functions</link>
            <link to="run_datetime">Date & Time</link>
            <link to="run_string">String Manipulation</link>
            <link to="run_input">User Input</link>
        </group>
    </catagory>
    <catagory name="Packaged Libraries">
        <link to="pack_qbgfx">QB Graphics Kit</link>
        <link to="pack_win32">Win32 API Kit</link>
    </catagory>
</content>
Does anybody like it? Does anybody hate it? It's okay, I hate you too already, telling me won't hurt and I'm open to suggestions. Note that this documentation, when parsed and placed online, will, or at least should have a keyword index that'll put PSET, IF, SUB and LTRIM in the same list.

The layout i see in my mind has two columns. But layouts come later. If anyone has any questions, reply or pm me or something.
I have no knowledge of what it does but if it works like your QBOHO then I'm all for it. :*)
Heh Smile I need to update that old thing. Man, Microsoft could have picked a billion other formats for their help system and all of them would have been less of a pain in the butt.
Here... I whipped up the changelog last night. Two pages down, a bajillion to go.

Seriously, does anyone even know some ready-made wiki software like PHPBB I could use?
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<header>
    <id>changelog</id>
    <title>Version Changelog</title>
    <author>Joe Antoon</author>
    <description>Changes between versions of FreeBasic</description>
    <layout>changelog</layout>
</header>

<content>
    <version num="0.07b" date="12/09/04" time="14:46:40">
        <fix type="changed" author="V1ctor">DIM now can be used with non-constant indexes, what will create a dynamic array</fix>
        <fix type="added" author="V1ctor">DIM array(), dynamic arrays with unknown dimensions as in VBDOS/VB</fix>
        <fix type="fixed" author="V1ctor">RTRIM$ would fail with fixed-len strings as fb_StrAssign was not padding them with nulls</fix>
        <fix type="fixed" author="V1ctor">DATE$ was allocating 2 chars less than needed</fix>
        <fix type="fixed" author="V1ctor">EXIT was not checking if was inside a compound stmt or a proc, an access violation would happen</fix>
        <fix type="fixed" author="V1ctor">Vars explicity declared with full type weren't be found when used with a prefix of same type</fix>
        <fix type="fixed" author="V1ctor">emit was pushing words to stack and cleaning 4 bytes when converting to/from fpoint vars to/from short vars</fix>
        <fix type="fixed" author="V1ctor">ERASE was accepting any kind of vars, including scalars and non-dynamic arrays </fix>
        <fix type="fixed" author="V1ctor">const relop expr would gen bad code (dst as immediate value)</fix>
        <fix type="fixed" author="V1ctor">Functions should never be allowed to return structs</fix>
        <fix type="fixed" author="V1ctor">INPUT statement for console was generating an infinite loop at AST if no prompt string was passed</fix>
        <fix type="fixed" author="V1ctor">sdlmouse.bi: SDL_WarpMouse was named as SDL_WrapMouse</fix>
    </version>
    <version num="0.06b" date="12/06/04" time="22:44:59">
        <fix type="added" author="V1ctor">STATIC declared before SUB or FUNCTION like in VBDOS/VB</fix>
        <fix type="added" author="V1ctor">Another quirk: ELSE and ELSEIF with statements in the same line </fix>
        <fix type="added" author="V1ctor">"IF expr THEN linenumber", GOTO ugly stuff</fix>
        <fix type="added" author="V1ctor">Byte and floating-point vars can now be freely mixed</fix>
        <fix type="added" author="V1ctor">ALIAS declaration on SUB's or FUNCTION's (prototypes already had that)</fix>
        <fix type="added" author="V1ctor">FRE function</fix>
        <fix type="fixed" author="V1ctor">Assumption that GAS would convert IDX*3 to IDX*2+IDX like MASM/TASM/NASM do</fix>
        <fix type="fixed" author="V1ctor">Passing non-existent arrays by descriptor would cause an access violation</fix>
        <fix type="fixed" author="V1ctor">RND should never return 1.0</fix>
        <fix type="fixed" author="V1ctor">Too few array dimensions (limited to 16 now)</fix>
        <fix type="fixed" author="V1ctor">DATE$ was wrong, libc's localtime() returns current year less 1900</fix>
        <fix type="fixed" author="V1ctor">FOR was accepting UDT fields as counter</fix>
        <fix type="fixed" author="V1ctor">File names with spaces, now quotes are added when passing them to AS and LD</fix>
        <fix type="fixed" author="V1ctor">When path contains spaces, EXEC, RUN and CHAIN will use a short one</fix>
    </version>
    <version num="0.05b" date="12/05/04" time="22:01:42">
        <fix type="added" author="V1ctor">NEXT with multiple identifiers (NEXT a, b, ...), as many old sources seem to have that</fix>
        <fix type="fixed" author="V1ctor">PRINT and WRITE stmts were accepting expressions separated by white-spaces (BC also allows that)</fix>
        <fix type="fixed" author="V1ctor">Quirks with LINE INPUT and INPUT for console, message is optional (try parsing that using a LR..)</fix>
        <fix type="fixed" author="V1ctor">And another one with CLOSE, file number is also optional and that way it works as RESET</fix>
        <fix type="fixed" author="V1ctor">CSRLIN was declared as CSRLINE</fix>
    </version>
    <version num="0.04b" date="12/04/04" time="22:02:51">
        <fix type="fixed" author="V1ctor">SDL prototype for UnlockSurface, the alias was wrong</fix>
        <fix type="fixed" author="V1ctor">SDL include files: all BYREF args were changed to BYVAL ... PTR, for better consistency</fix>
        <fix type="fixed" author="V1ctor">Line continuation char "_" was being processed inside comments and $include's file names</fix>
        <fix type="fixed" author="V1ctor">Entry point name wasn't checking for "-" chars, that are valid on file names, but invalid on symbol names</fix>
        <fix type="fixed" author="V1ctor">Using RESTORE w/o a label before any DATA statement would create the wrong default label</fix>
        <fix type="fixed" author="V1ctor">Loading larger vars to byte ones with SI/DI was wrong as the source type was not being remapped at EMIT</fix>
        <fix type="changed" author="V1ctor">FPU initialization is done at rtlib now, for better portability</fix>
        <fix type="added" author="V1ctor">LOCAL keyword to be used with ON ERROR statments, when inside sub-routines</fix>
        <fix type="added" author="V1ctor">"ERR = expr" statement, for setting the error number (the ERR function already existed)</fix>
        <fix type="fixed" author="V1ctor"></fix>
    </version>
    <version num="0.03b" date="12/03/04" time="10:08:42">
        <fix type="fixed" author="V1ctor">entry point name was wrong when the source file had slashes in the name, and not back-slashes</fix>
        <fix type="fixed" author="V1ctor">IR was renaming the compare ops when operands hadn't the same class, 'cause a x86 FPU opt. done at AST</fix>
    </version>
    <version num="0.02b" date="12/02/04" time="00:37:43">
        <fix type="fixed" author="V1ctor">IR module was not freeing regs of the same classes while making int convertions and reusing them</fix>
        <fix type="fixed" author="V1ctor">optargs.bas wasn't working, it was being used just as a prototype, shouldn't be there</fix>
        <fix type="fixed" author="V1ctor">Argument-less function pointers: parser wasn't accepting them when ()'s were used</fix>
        <fix type="fixed" author="V1ctor">RIGHT$ was reversing the result </fix>
        <fix type="fixed" author="V1ctor"></fix>
    </version>
    <version num="0.01b" date="11/30/04" time="23:34:43">
        <fix type="added" author="V1ctor">That's it, Version 0.01 Beta was released today, please report any bugs using the support page at Sourceforge.net</fix>
    </version>
</content>
EDIT: Yeah, this looks several times more elegant without word-wrap.
Here's the page of the day. I thought something in the vein of the background page might be interesting. If someone could proofread and factcheck this that's be awesome.
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<header>
    <id>fbqb</id>
    <title>FreeBasic and QBasic</title>
    <author>Joe Antoon</author>
    <description>Freebasic's origins in QuickBasic</description>
    <layout>textdoc</layout>
</header>

<content>
    <topic title="FreeBasic as a Sequel">
        <p>FreeBasic is designed as a "sequel" of sorts to a
        high level compiler for MS-DOS titled "QuickBasic",
        which compiled BASIC code, an easy-to-read programming
        language created in 1964 by  John Kemeny and Thomas
        Kurtz .  "QB" was packaged with a user-friendly IDE
        and interpreter that made it very easy to write
        custom applications.  This line of products is
        officially continued today in the form of "Visual
        Basic", part of Microsoft's Studio .NET programming
        suite.</p>
    </topic>
    <topic title="Microsoft and BASIC Products">
        <p>Microsoft and BASIC extend far prior to QuickBasic.
        In fact, Microsoft's first product was a small
        BASIC interpreter for Altair computers released in
        1975, and until the early 80s Microsoft was known only
        as a language vender.  They ported their Basic
        software to several different personal computers at
        the time, and made decent business doing it.</p>
        <p>In August of 1981 Microsoft released the next major
        step in it's basic line, "Advanced Basic", as part
        of a comission for IBM's PC-DOS, and is more often
        called by its executable name, BASICA.EXE.  For Microsoft's
        new MS-DOS, they released GW-BASIC, which was, for
        the most part a port of BASICA that did not require
        IBM's Basic ROM included with its systems.</p>
        <p>BASICA and GW-BASIC are interpreters.  Interpreters
        read source code and "interpret" it into computer code
        as it is read.  This is useful, but slow.
        Microsoft, in 1983, released BASCOM for MS-DOS.  BASCOM
        compiled BASIC code into native machine code, which
        ran much faster than interpreted code.  This was
        repackaged with an IDE and released as QuickBasic in
        1985.</p>
    </topic>
    <topic title="QuickBasic">
        <p>From 1985 to 1992, QuickBasic was the primary BASIC
        product, released by Microsoft and using BASCOM and
        later the Microsoft Basic Compiler.  In 1991, a
        slimmed down interpreter often thought to be the
        missing "QuickBasic 5.0" was packaged with MS-DOS 5.0
        and released as "QBasic 1.1".</p>
        <p>QuickBasic as a BASIC dialect provides a loose
        standard for modern BASIC compilers.  It abolishes
        the need for line numbers as a used in previous BASIC
        interpreters, is case sensitive and has keywords that
        are in plain English.  QuickBasic also featured a
        runtime library, that is a library compiled by default
        and usable in source code, with many useful commands.</p>
        <p>In 1991, Microsoft combined a drag-and-drop GUI
        designer made in 1988 called 'Ruby' with QuickBasic.  
        This product was called "Visual Basic", and marks the
        beginning of the end of QuickBasic.  Microsoft released
        one last version of QuickBasic called "Visual Basic for
        DOS, and discontinued the product forever.</p>        
    </topic>
    <topic title="The Internet and QBasic's Second Wind">
        <p>Because the "QBasic 1.1" interpreter was packaged with
        MS-DOS, it was released with every copy of DOS until
        its dying days, Windows 3.1 and even Windows 98, 98 and
        ME.  With the wild success of Windows, QBasic became the
        most widely available programming tool available.</p>
        <p>When the World Wide Web became popular in the mid-90s,
        many hobbyist programmers made websites dedicated to
        QuickBasic not as an application tool, but as a platform
        for their demos and games.  Many assembly libraries were
        created for it posthumously, and as these demos and games
        became more elaborate, so did the "QB Community".  From
        mid-90s, through the new Millineum to today, QuickBasic
        has enjoyed a small but present cult following.</p>
        <p>Andre Victor, FreeBasic's creator, was first known over
        the internet as the author of several extensions to
        QuickBasic in the form of libraries.  He created routines
        to improve the speed of floating point operations, access
        the internet and use SVGA graphics.  In the late summer
        of 2004, he began work on a 32-bit compiler using Visual
        Basic for Dos.</p>
    </topic>
    <topic title="FreeBasic is Born">
        <p>FreeBasic was first programmed in VB-DOS, with the
        goal of compiling itself.  Because of this, both its
        syntax and runtime library are designed to emulate
        QB's syntax and runtime as far as it is practical in a
        32-bit Windows environment.  For the most part, however,
        the two dialects are extremely similar, and most code can
        be ported with little or no modification, though in some
        cases MS-DOS reliant routines must be discarded.  The
        resulting compiler shares a greater similarity to QB than
        any compiler on the market, including Visual Basic.</p>
        <p>Because of its open source, its well-written code and
        its similarity to QB, FreeBasic has become popular
        among the "QB Community" and its boundaries continue to
        grow as it receives more attention, and gathers more
        features that promise to move BASIC into the future</p>
    </topic>
</content>
http://www.hotscripts.com

You aren't going to get much if you insist on sticking with your wonderful plan of XML, unless you write your own wiki.
Thanks, Aetherfox. I looked at blast wiki like the faq here has. Other than the "forced wordwrap" that I guess all wikis bring, it's not bad, I might try it.

Right now, you can log into the public ftp.betterwebber.com
You need to use the username anonymous@betterwebber.com instead of 'anonymous' (shared hosting). You can upload files into the 'incoming' folder. I'll move the files over once a day. You can't use ie, but any ftp program such as ws_ftp will work.

...Oh, and I'm not deaf to sarcasm Wink. XML is just using text markup for data storage, I think you're confusing it for something more than it is. But if you want to use "well formatted HTML" just make some docs that haven't been made yet, meet me in the middle, and we'll have another vote there. More important is that we get some text down with intention and organization, you can convert xml to html easily and html xml, they're not that different, save for "xml has no formatting info".

There are two more xml files there, the gpl license which was conveniently already available in xml (I'll convert it to the textdoc layout later), and an incomplete command line reference. Right now it just gives a brief explanation and example on using fbc.exe, but I need some information on the different command like options, such as what "verbose" means.
Look Jofers, I'm all for XML to become more internationally compatible than it is. I've looked into it, and I love it's ideaology.

But the word there was 'compatible.' Many many public domain wikis (which is every PHP one basically) will most likely not support XML. Correct me if I am wrong by the way, I haven't used a wiki since '02. But, I do follow PHP script developments.

If this blast wiki does, then shoot. It's a good idea. I'll lend a hand in documentation if needed.

Give a link to blast's homepage.

And try to set up some sort of trial for it, so we can see how it's hanging.
Ah. My sarc-dar is off, I suppose. I don't know about wikis. Never used one, still unsure as to what I want with it. Turns out blastwiki's not really what I wanted.

I've got a test run up at http://www.betterwebber.com/wiki, you can see why there Smile

It wants me to make a site. I just want a text file collection. You know, something in which you can sign up, and then have access to a bunch of files you can download and edit it. A wiki's not what I'm looking for to display the actual documentation, just something to organize making it.
Then you don't want a wiki Big Grin simple as that.

What you are looking for is something totally different.

What you don't want, is what a wiki does. Present documentation in a publicly accessible and editable fashion, not a collection of downloadable files.
Pages: 1 2