diff --git a/doc/lpc/class b/doc/lpc/class index e2e8144133c9c008e9da18edc1678c4a08dec68d..56b330b9e9e398484f5545c3b411db6349aa4b9f 100644 --- a/doc/lpc/class +++ b/doc/lpc/class @@ -1,5 +1,5 @@ NAME - class + class - define a inlined program SYNTAX class { program definition } @@ -14,5 +14,8 @@ EXAMPLE complex->r=1.0; complex->i=1.0; +KEYWORDS + lpc + SEE ALSO inherit, lambda diff --git a/doc/lpc/hilfe b/doc/lpc/hilfe index ffb96fbba95233ce6c754c7687559b2b9a563d45..6104838405d78e7cb3f0175eddbeef28b369ea11 100755 --- a/doc/lpc/hilfe +++ b/doc/lpc/hilfe @@ -39,17 +39,14 @@ DESCRIPTION Evaluate a statement: <statement> ; Statements include the following examples: - for(e=0;e<10;e++) ; - - e=10; - write(e); + for(e=0;e<10;e++) ; - if(foo) return bar; else return gazonk; + e=10; - Statements beginning with for, while, switch, if, do or return will - not automatically return anything, and no result will be printed. + write(e); + if(foo) return bar; else return gazonk; -SEE ALSO - script_mode + Statements beginning with for, while, switch, if, do or return will + not automatically return anything, and no result will be printed. diff --git a/doc/lpc/preprocessor b/doc/lpc/preprocessor index 4a3bd37c59c44ff0c1ed92c01bf1e8f267533e11..b8e0361be86cc941129e7ee12a344c24ea565221 100644 --- a/doc/lpc/preprocessor +++ b/doc/lpc/preprocessor @@ -1,25 +1,28 @@ +NAME + preprocessor - textually process code before compiling + DESCRIPTION µLPC has a builtin C-style preprocessor. It works similar to old C preprocessors but has a few extra features. This file describes the different preprocessor directives. PREPROCESSOR DIRECTIVES - #! - #define - #elif - #else - #elseif - #endif - #error - #if - #ifdef - #ifndef - #include - #line - #pragma - #undef - ----------------------------------------------------------------------------- + #! + #define + #elif + #else + #elseif + #endif + #error + #if + #ifdef + #ifndef + #include + #line + #pragma + #undef + +============================================================================ DIRECTIVE #! @@ -30,27 +33,27 @@ DESCRIPTION the script with #!/usr/local/bin/ulpc ----------------------------------------------------------------------------- +============================================================================ DIRECTIVE #define DESCRIPTION The simplest way to use define is to write - - #define <identifier> <replacement string> + + #define <identifier> <replacement string> which will cause all subsequent occurances of 'identifier' to be replaced with the replacement string. Define also has the capability to use arguments, thus a line like - #define <identifier>(arg1, arg2) <replacement string> + #define <identifier>(arg1, arg2) <replacement string> would cause identifer to be a macro. All occurances of 'identifier(something1,something2d)' would be replaced with the replacement string. And in the replacement string, arg1 and arg2 will be replaced with something1 and something2. ----------------------------------------------------------------------------- +============================================================================ DIRECTIVE #undef @@ -65,7 +68,7 @@ EXAMPLES #undef foo #define foo(bar) gazonk bar #undef foo ----------------------------------------------------------------------------- +============================================================================ DIRECTIVE #if #elif @@ -111,7 +114,7 @@ EXAMPLES #if !efun(write_file) inherit "simulate.lpc" #endif ----------------------------------------------------------------------------- +============================================================================ DIRECTIVE #error @@ -123,7 +126,7 @@ EXAMPLES #if !efun(write_file) #error Move object is missing #endif ----------------------------------------------------------------------------- +============================================================================ DIRECTIVE #include @@ -134,7 +137,7 @@ DESCRIPTION EXAMPLES #include "foo.h" ----------------------------------------------------------------------------- +============================================================================ DIRECTIVE #line @@ -149,7 +152,7 @@ DESCRIPTION EXAMPLES #line 4 "foo.cf" /* The next line was generated from 4 in foo.cf */ ----------------------------------------------------------------------------- +============================================================================ DIRECTIVE #pragma @@ -157,4 +160,4 @@ DESCRIPTION This is a generic directive for flags to the compiler. Currently, the only flag available is 'all_inline' which is the same as adding the modifier 'inline' to all functions that follows. ----------------------------------------------------------------------------- +============================================================================