| Home | Overview | Documents | Content Dictionaries | Software & Tools | The OpenMath Society | OpenMath Projects | OpenMath Discussion Lists | OpenMath Meetings | Links |
A CD for basic algorithmic concepts. We define the minimal machinery to write small programs in OpenMath encoding.
This symbol is used to assign values to variables. The syntax is assignment(variable, value), where variable is the encoding of an OpenMath variable (OMV) and value is an OpenMath object.
| [Next: block] [Last: procedure_block] [Top] |
This symbol is meant to represent an arbitray block of code. A block of code can be empty. The syntax is block(obj1, obj2,...,objN), where obji is the OpenMath encoding of the ith sentence (or action) inside the body.
| [Next: local_var] [Previous: assignment] [Top] |
This symbol can be used to declare local variables.
| [Next: global_var] [Previous: block] [Top] |
This symbol can be used to declare global variables as know to function.
| [Next: return] [Previous: local_var] [Top] |
This symbol can be used to return values from fuctions.
| [Next: for] [Previous: global_var] [Top] |
This symbol can be used to encode the for loop. The syntax is for(block1,conditional_block,block3,block4), where block1 is the inicialization block, conditional_block is the conditional block that determines the end of the loop, block3 is the incremental block and block4 is the body of the for loop. Each of this blocks should be present (althougth they can be empty).
| [Next: while] [Previous: return] [Top] |
The symbol the while loop. The syntax is while(conditional_block, block1), where conditional_block is the block that determines when to stop the while loop and block1 is the body of the while loop.
| [Next: if] [Previous: for] [Top] |
The symbol can be used to encode the if, then, else construct. The syntax is if(conditional_block,block1,block2), where the conditional_block is the block that determines wich of the block of codes block1 and block2 is going to be executed, block1 is the then block and block2 if the else block. The conditional_block and block1 are required but block2 is optional.
| [Next: call_arguments] [Previous: while] [Top] |
This symbol can be used to encode the arguments that will be pased to a function or procedure.
| [Next: def_arguments] [Previous: if] [Top] |
This symbol can be used to encode the arguments that a function or procedure can receive.
| [Next: function_block] [Previous: call_arguments] [Top] |
The block of code defining the body of the function. The syntax is function_block(local_var,block1), where local_var encodes the local variables (private to the function body) and block1 is the body of the function. Both locar_var and block1 should be present (and of course both can be also empty).
| [Next: function_definition] [Previous: def_arguments] [Top] |
The symbol function_definition can be is used to define a function. The syntax is function_definition(name, def_arguments, function_block), where name is the encoding of an OpenMath variable (OMV) representing the name of the funtion, def_arguments is the enconding of the arguments that the function receives and function_block is the body of the function (local variables declarations + body of the function). Functions are completely unaware of the rest of the "world" except for the information they received from the arguments. Functions are only allowed to return values by means of the return construct.
| [Next: function_call] [Previous: function_block] [Top] |
Symbol function_call can be used to "call" already defined functions. The syntax is function_call(name, call_arguments), where name is the encoding of an OpenMath variable (OMV) representing the name of the function and call_arguments are the arguments to pass to the function. Both, name and call_arguments, should be present but call_arguments can be empty.
| [Next: procedure_definition] [Previous: function_definition] [Top] |
This symbol can be used to define a procedure. The sintax is procedure_definition(name, def_arguments, procedure_block), where name is the encoding of an OpenMath variable representing the name of the procedure, def_arguments encodes the argument the procedure can receive and procedure_block encodes the body of the procedure. Contrary to function procedures can have knowledge about global objects by means of the global_var construct (see procedure block).
| [Next: procedure_call] [Previous: function_call] [Top] |
Symbol procedure_call can be used to "call" already defined procedures. The syntax is procedure_call(name, call_arguments), where name is the encoding of an OpenMath variable (OMV) representing the name of the function and call_arguments are the arguments to pass to the function. Both, name and call_arguments, should be present but call_arguments can be empty.
| [Next: procedure_block] [Previous: procedure_definition] [Top] |
The block of code defining the body of the procedure. The syntax is procedure_block(local_var, global_var, block1), where local_var encodes the local variables (private to the procedure body), gloval_var are global variables that are know to the procedure and block1 is the body of the procedure. All these elements, locar_var, global_var and block1, should be present (but they can also be empty).
| [First: assignment] [Previous: procedure_call] [Top] |
| Home | Overview | Documents | Content Dictionaries | Software & Tools | The OpenMath Society | OpenMath Projects | OpenMath Discussion Lists | OpenMath Meetings | Links |