How do I use BBDoc

BlitzMax Forums/BlitzMax Beginners Area/How do I use BBDoc

I've searched around but can't find how I need to format my comments to make autodocs.
Could some post them or point me in the right direction?

Anyone??
C'mon help a guy out!

simply from observation of the modules:

REM
bbdoc: <description>
returns: <what it returns>
about: <details>
EndRem
Function BLAH(blah)


you can use test and html tags anywhere within the <>

Thank you!

Does this also work with normal program code or only when creating blitzmax modules?

Is this a way for documenting my program sourcecode, like when using doxygen for c++ ?

ok, if you have a file called intro.html, it lets you have info about the module before all the commands, and by putting a .bmx file with the commands name you can have source code with a command.

I am sorry. i did't understand that explenation.

If i create a programm with a few functions in my code. i put the rem bbdoc: <...> ... endrem block in front of my functions.

Now how do i force BlitzMax to create a list of all my functions with the corresponding description?

you need to run from a command prompt:
bmk docmods
bmk syncdocs


When i run
bmk docmods

i get the following error:
Unable to read stream: console.bmxDocmods Error


Any help?

do:
bbdoc docmods
bbdoc syncdocs

or you can create a batch file called builddocs.bat in the bin directory, edit it in notepad and put the following in there:
call bbdoc docmods
call bbdoc syncdocs

then you can either double click it or type builddocs at the command prompt.

Using:
bbdoc docmods

I get the error:
Unable to read stream: console.bmx

rename your console.mod directory temporarily and try again.

It works!
What is the problem then??

console.mod probbly doesn't have source.

No it doesn't. It should??

not necessarily, but bbdoc can't document something without a sourcefile there.
you could create a console.bmx dummy file to avoid having to rename it.

But not having the source file (do you have it? not the dummy) when i sync modules remotely shouldn't that make an error?
I can sync modules and docs without any problem.

console.mod is not a BRL module, it's probably either filax's or the other one that was made.

Oh, you're right. It's pub.
But I don't understand one thing. Is it necessary for bbdoc to have the source files of all the modules?

it's necessary because the bbdoc commands are contained inside the bmx files. You can still distribute precompiled mods but you need to create a .bmx file that contains the doc commands for bbdoc to correctly function.

I see... Maybe bbdoc should ignore modules that don't have source files.
Thanks Perturbatio for your help.

I see... Maybe bbdoc should ignore modules that don't have source files.

ideally.
if Mark ever releases the source then you could change it yourself :)

Is this stuff possible on OSX? I open my Terminal and navigate to the BlitzMax/bin directory but nothing I see in there is executable to the bash shell.

isn't there a bmk app file?

it should be either there or you could create it from the src

OK ... wait, I can do:

./bmk

Which doesn't seem to do a whole lot. What's the syntax?

I can also do:

./docmods

Which takes a second to run but doesn't seem to produce any tangible output for my mod.

Yeah, docmods and syncmods were separated from bmk a while back (docs weren't updated).

Running docmods should generate the documents correctly (docmods now also does a 'syncdocs' by default). You may have to restart the IDE to see them though.

./docmods mymods.somemod

But the code must be correct to work! There is especially one thing often forgotton or done wrong:


rem
  bbdoc: This module
end rem
Module mymods.somemod

...

There must not be a blank line in between the rem block and module or you won't get any docs.

Its assumed that this is part of somemod.bmx which is within mod/mymods.mod/somemod.mod