Handbook
Glossary
new-section ( length class -- section )
Factor handbook
»
Developer tools
»
The prettyprinter
»
Extending the prettyprinter
»
Prettyprinter sections
»
Prettyprinter section protocol
Prev:
long-section ( section -- )
Next:
new-block ( class -- block )
Vocabulary
prettyprint
.
sections
Inputs
length
an
integer
class
a subclass of
section
Outputs
section
a
section
Word description
Creates a new section with the given length starting from
position
, advancing
position
.
Definition
USING:
accessors
kernel
math
namespaces
;
IN:
prettyprint.sections
:
new-section
( length class -- section )
new
position
[
[
>>start
]
keep
swapd
+
[
>>end
]
keep
]
change
0
>>overhang
;
inline