Commit e1fcc4db authored by Bruno BELANYI's avatar Bruno BELANYI

predefined_functions: fix ':' spacing in signature

parent 68437eef
Pipeline #16732 passed with stage
in 46 seconds
......@@ -9,16 +9,16 @@ and with exit code 120. The error messages must follow the standard.
Any difference, in better or worse, is a failure to comply with the
(**this**) Tiger Reference Manual.
string: chr (code \: int)
string: chr (code\: int)
| Return the one character long string containing the character which code is
| If ``code`` does not belong to the range [0..255], raise a runtime
error: ``chr: character out of range``.
string: concat (first \: string, second \: string)
string: concat (first\: string, second\: string)
Concatenate ``first`` and ``second``.
void: exit (status \: int)
void: exit (status\: int)
Exit the program with exit code ``status``.
void: flush ()
......@@ -27,36 +27,36 @@ void: flush ()
string: getchar ()
Read a character on input. Return an empty string on an end of file.
int: not (boolean \: int)
int: not (boolean\: int)
Return 1 if ``boolean`` = 0, else return 0.
int: ord (string \: string)
int: ord (string\: string)
Return the ascii code of the first character in ``string`` and -1
if the given string is empty.
void: print (string \: string)
void: print (string\: string)
Print ``string`` on the standard output.
void: print_err (string \: string)
void: print_err (string\: string)
Note: this is an EPITA extension. Same as ``print``, but the output is
written to the standard error.
void: print_int (int \: int)
void: print_int (int\: int)
Note: this is an EPITA extension. Output ``int`` in its decimal canonical
form (equivalent to ``%d`` for ``printf``).
int: size (string \: string)
int: size (string\: string)
Return the size in characters of the string.
int: strcmp (a \: string, b \: string)
int: strcmp (a\: string, b\: string)
Note: this is an EPITA extension. Compare the strings ``a`` and ``b``.
Return -1 if ``a`` < ``b``, 0 if equal, and 1 otherwise.
int: streq (a \: string, b \: string)
int: streq (a\: string, b\: string)
Note: this is an EPITA extension. Return 1 if the strings ``a`` and ``b``
are equal, 0 otherwise. Often faster than strcmp to test string equality.
string: substring (string \: string, first \: int, length \: int)
string: substring (string\: string, first\: int, length\: int)
Return a string composed of the characters of ``string`` starting at the
``first`` character (0 being the origin), and composed of ``length``
characters (i.e., up to and including the character ``first`` + ``length`` - 1).
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment