This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
MKlegoman357's profile picture

Programs' pages formating

Started by MKlegoman357, 16 April 2014 - 07:33 PM
MKlegoman357 #1
Posted 16 April 2014 - 09:33 PM
There are built in programs and they all need their page on wiki. For now, there is no particular formatting rules for program pages which we should have.

First thing that comes to my mind is a template for all programs. In that template we would list all arguments, which are optional, which are needed, etc. We should also mention on what systems they work, advanced or non-advanced, turtles, computers or PDAs.

The page layout could be similar to API pages: first there is a description, then the template mentioned above and then examples/notes/anything that is still not mentioned.

EDIT: Also, about function links. I think they look nicer when they are linked together with their parenthesis and, if there are any, arguments.

This is what I don't like:

[[Fs.getDir]]( path )

This Is what I like:

[[Fs.getDir|fs.getDir( path )]]
Edited on 16 April 2014 - 07:43 PM
Lyqyd #2
Posted 16 April 2014 - 10:50 PM
Function links should only be the name of the function. That allows one to use other links for the arguments.
Bomb Bloke #3
Posted 16 April 2014 - 11:27 PM
Note that [[Fs.getDir]]( path ) leads to the same page as [[fs.getDir]]( path ). I tend not to bother adding parameters into function references (let alone linked parameters) unless filling out the API lists (where they belong); I figure if people want to know how to use a given function, they can find out all about it by opening its dedicated page. Parameter lists can get messy and they distract from the topic at hand, so I generally go for something along the lines of [[fs.getDir|fs.getDir()]].

One option for program pages is an infobox, similar to the one used for blocks.
Cranium #4
Posted 17 April 2014 - 07:55 AM
I've actually been updating some of the missing programs included in the CraftOS Shell and TurtleOS. In general, I've been adding the pages with a brief description of the program, and the syntax for using them in a shell environment. If anyone has any improvements, feel free.