[Next] [Prev] [Right] [Left] [Up] [Index] [Root]
Comments

Comments

The Magma language has two ways of indicating that some input should be ignored by the Magma system. This is useful because it allows the programmer to make comments explaining the code.

Firstly, any text following

//

until the end of the line will be ignored by Magma.

Secondly, any text between

/*

and

*/

will be ignored by Magma.

The first form is suitable for single-line comments and the second form for multi-line comments.

Example

> F := GF(2, 6); // construct field F
> print F;
Finite field of size 2^6

> double := function(n) function> /* This silly function function> returns 2 multiplied function> by n. */ function> return 2*n; function> end function;

[Next] [Prev] [Right] [Left] [Up] [Index] [Root]