Sfairadora

  • Reference Guide

Character Format Analysis Functions

The each of the functions described further returns the value of an individual specific attribute of a character format. If the value of the attribute is not specified, the function returns the value NONE. Therefore, the type of the return value of these functions is a union Type|None, where Type is the proper type of the attribute. A typical code for an attribute value handling looks like this:
var Int|None font_size = rcf_get_size(rcf);
if(font_size===NONE)
(
// the attribute is not set
)
else
(
// the attribute is set
)
Note that it is necessary to use the operator === in the condition, in order to prevent a type conversion. An alternative way to express the condition is: if(type(font_size)==None).

Overview