Code.Navigator, unofficial add-on for SciTE
Code.Navigator, unofficial add-on for SciTE
News & Download | Screenshots | Code Examples
Code examples, alphabetically listed

Read before use

It is important to note how the basics of the markup of Code.Navigator works: first of all a root-node is needed, it is created by adding the following format on a clean line in your code:
**;:rootexample
The ** can be any sort of comment indicator(s), typically "//" or something similar depending on the language used (you want the compiler to skip these lines.. unless its very special). If the language itself uses one or two of the root-node indicator chars (";:") as comment point it is possible to work around this; please see the AutoIt example below. When you want to add a sub-node to a root-node (you always need a root before a sub can be added) the syntax is as follows:
**;;rootexample:sub-node one
The ** should again be written as comment indicators and the sub-node uses ";;" (as opposed to ";:" for a root). Notice how the already made "rootexample" is followed by a ":" and then the sub-node "sub-node one", which is the text that will be displayed in Code.Navigator. Both sub- and root-nodes are allowed to contain spaces and other chars. The indicators were chosen at random and may present a problem if working with particular strings - depending on feedback future version of CN could contain an option to enable of use custom markup.

AutoIt

[...notice, non of these code examples can actually run, just syntax demonstrations]
Local $ret, $pidl, $res = ''
;:::Functions <-- example of main node (contains ";:" at start as AutoIt uses ";" for comments)
Local $ubi = DllStructCreate ("hwnd;ptr;ptr;ptr;int;ptr;ptr;int") ; structure BROWSEINFO
Local $utl = DllStructCreate ("char[512]") ; Browse title
Local $urs = DllStructCreate ("char[260]") ; Buffer for path (MAX_PATH size)
Local $ulf = BitOR (BitShift(BitAnd ($flags,1),-9), _ ; 1: NOT show Create Folder Button
BitShift(BitAnd ($flags,2),-5), _ ; 2: Use New Dialog Style
BitShift(BitAnd ($flags,4),-2)) ; 4: Show Edit Control
;;;;Functions:Filling structures <-- example of sub node (contains ";;" as identifier)
DllStructSetData ($utl, 1, $title)
DllStructSetData ($ubi, 1, $hwnd)
DllStructSetData ($ubi, 3, DllStructGetPtr($urs))
DllStructSetData ($ubi, 4, DllStructGetPtr($utl))
DllStructSetData ($ubi, 5, $ulf)
[...]

C++

[...notice, non of these code examples can actually run, just syntax demonstrations]
//;:main <-- example of main node (contains ";:"later in string as C++ uses "//" for comments)
main(int argc, char *argv[])
{
//;;main:globals <-- example of sub node (contains ";;" as identifier)
__int64 SmallN; /*64-bit wide integer, see BORLAND HELP for more info*/
__int64 SmallNOriginal;
__int64 BigN;
__int64 PrimeC;
__int64 Divisor;
__int64 Counter = 0;

//;;main:file pointers <-- example of sub node
FILE *FileLog; /*open filepointer called FileLog*/
FileLog = fopen("log.txt", "w"); /*let FileLog point to "log.txt"*/

double Dif;
time_t start,end;

//;;main:start of running code <-- example of sub node
if (argc != 3) /*argument count, the filename is 0 (0,1,2,etc..)*/
{
printf("pRi v0.3b, an C implementation of the C++ program PrimeQuest. \n",0);
printf("Input 2 numbers at commandline, prime range in between will be calculated\n",0);
printf("Options (pRi -? xx xxx):\n",0);
exit(0);

Java

On its merry way..

PHP

Yes..