foresight_math
A subset of LaTeX's inline math (
$...$) laid out as LuaTeX lays it out with unicode-math and Latin Modern Math (issue #5 step 4.1): letters in math italic, Greek (\alpha,\Gamma), sub- and superscripts (^,_, primes),\frac,\sqrt,\mathrm,\mathbf,\mathit, operators and relations with TeX's spacing (\cdot,\times,\pm,\le,\ge,\partial,\nabla, ...), inline\sum,\prodand\int(their limits as scripts), accents (\hat,\bar,\vec,\tilde,\dot),\left(...\right)sized to their content, operator names (\sin,\log, ...) and explicit spaces (\,,\;,\quad). No display style, matrices nor line breaking.
The formula is parsed into TeX's noads (Ord, Op, Bin, Rel, Open, Close, Punct, Inner, fractions, radicals, accents) and set by TeX's rules (The TeXbook, appendix G) with the constants of the font's MATH table: the styles (text, script, scriptscript, cramped), the spacing between atoms in mu (thin 3, medium 4, thick 5; none around binary and relation atoms in scripts), the script shifts and gaps, the fraction shifts and clearances, the radical's size variant and its rule, the delimiters' size variants. Script sizes are 70 % and 50 % (LaTeX's 7 and 5 pt at 10 pt), with the font's script alternates (ssty). \mathrm and \mathbf (and operator names) are the serif text faces, as unicode-math sets them in the main font.
Source: src/lib/foresight_math.F90
Dependencies
Contents
- math_item
- noad_tree
- box_state
- math_layout
- next_math
- any_outline
- parse_list
- parse_scripts
- parse_argument
- parse_atom
- text_argument
- text_list
- delimiter
- math_char
- command_code
- new_noad
- new_char
- set_list
- set_noad
- set_char
- set_scripts
- set_fraction
- set_radical
- set_accent
- set_fenced
- binary_to_ordinary
- glyph_box
- add_glyph
- add_rule
- shift
- skip_blanks
- utf8_code
- has_math
- any_upm
- any_advance
- atom_kind
- em
- axis
- starts
- is_letter
- word_number
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
MATH_FACE | integer(kind=I4P) | parameter | Face number of the math font (the text faces are 1-8). |
ORD | integer(kind=I4P) | parameter | |
OP | integer(kind=I4P) | parameter | |
BIN | integer(kind=I4P) | parameter | |
REL | integer(kind=I4P) | parameter | |
OPEN | integer(kind=I4P) | parameter | |
CLOSE | integer(kind=I4P) | parameter | |
PUNCT | integer(kind=I4P) | parameter | |
INNER | integer(kind=I4P) | parameter | |
FRAC | integer(kind=I4P) | parameter | |
RADICAL | integer(kind=I4P) | parameter | |
ACCENT | integer(kind=I4P) | parameter | |
SPACE | integer(kind=I4P) | parameter | |
FENCED | integer(kind=I4P) | parameter | |
TEXT_STYLE | integer(kind=I4P) | parameter | |
SCRIPT_STYLE | integer(kind=I4P) | parameter | |
SCRIPTSCRIPT_STYLE | integer(kind=I4P) | parameter | |
SPACING | integer(kind=I4P) | parameter | SPACING(right, left). |
MU | real(kind=R8P) | parameter | Thin, medium, thick spaces [em]. |
NULL_DELIMITER | real(kind=R8P) | parameter | LaTeX's \nulldelimiterspace, 1.2 pt at 10 pt [em]. |
SCALE | real(kind=R8P) | parameter | Size of each style [base size]. |
Derived Types
math_item
A glyph or a rule of a formula, from its origin (the start of its baseline), y up.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
face | integer(kind=I4P) | MATH_FACE (the math font) or a text face (1-8); 0 for a rule. | |
glyph | integer(kind=I4P) | Glyph number in its face. | |
unicode | integer(kind=I4P) | Character shown. | |
x | real(kind=R8P) | Origin abscissa (a rule's left). | |
y | real(kind=R8P) | Baseline ordinate (a rule's bottom), up. | |
size | real(kind=R8P) | Font size (a rule's width). | |
height | real(kind=R8P) | A rule's height. |
noad_tree
The parsed formula: noads in lists (linked by next), each with a nucleus and its scripts.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
kind | integer(kind=I4P) | allocatable | Noad kind. |
face | integer(kind=I4P) | allocatable | Face of a character nucleus (MATH_FACE or a text face). |
glyph | integer(kind=I4P) | allocatable | Glyph of a character nucleus (an accent's, a radical's), 0 if a list. |
code | integer(kind=I4P) | allocatable | Its character. |
list | integer(kind=I4P) | allocatable | Nucleus list (a fraction's numerator, a radical's or accent's body). |
other | integer(kind=I4P) | allocatable | A fraction's denominator. |
left | integer(kind=I4P) | allocatable | A fenced list's left delimiter glyph (0 none). |
right | integer(kind=I4P) | allocatable | Its right delimiter glyph (0 none). |
sup | integer(kind=I4P) | allocatable | Superscript list, 0 none. |
sub | integer(kind=I4P) | allocatable | Subscript list, 0 none. |
next | integer(kind=I4P) | allocatable | Next noad of the list, 0 last. |
space | real(kind=R8P) | allocatable | An explicit space [em] (SPACE noads). |
n | integer(kind=I4P) | Noads. |
box_state
The items of the formula being set and the boxes' extents.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
items | type(math_item) | allocatable | Items. |
n | integer(kind=I4P) | Items in use. |
Subroutines
math_layout
The items of the math source (without its $) set in text style at font size: glyphs and rules from the formula's origin (y up, in the units of size), its width, height and depth.
Attributes: pure
subroutine math_layout(source, size, items, width, height, depth)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
source | character(len=*) | in | LaTeX math. | |
size | real(kind=R8P) | in | Font size. | |
items | type(math_item) | out | allocatable | Glyphs and rules. |
width | real(kind=R8P) | out | Width. | |
height | real(kind=R8P) | out | Height above the baseline. | |
depth | real(kind=R8P) | out | Depth below it. |
Call graph
next_math
The next math run of text from from, as pandoc reads TeX math in text: an unescaped $ followed by a non-blank opens it, the next unescaped $ preceded by a non-blank and followed by no letter, digit nor _ closes it (gnuplot's $data blocks and $f(x) function blocks, $5 and $10, are text); open and close the dollars' positions, 0 when there is none.
Attributes: pure
subroutine next_math(text, from, open, close)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Text. | |
from | integer(kind=I4P) | in | First position. | |
open | integer(kind=I4P) | out | Opening dollar, 0 none. | |
close | integer(kind=I4P) | out | Closing dollar, 0 none. |
Call graph
any_outline
Outline of a glyph of a text face or of the math font.
Attributes: pure
subroutine any_outline(face, glyph, ops, points)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
face | integer(kind=I4P) | in | Face. | |
glyph | integer(kind=I4P) | in | Glyph. | |
ops | integer(kind=I4P) | out | allocatable | Operations. |
points | integer(kind=I4P) | out | allocatable | Points, x and y. |
Call graph
parse_list
The noads from at to the end, to the } closing the group (closed) or to a \right: its first noad.
Attributes: pure, recursive
subroutine parse_list(tree, source, at, closed, head)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
source | character(len=*) | in | LaTeX math. | |
at | integer(kind=I4P) | inout | Position. | |
closed | logical | in | A group: stop after its }. | |
head | integer(kind=I4P) | out | First noad, 0 for an empty list. |
Call graph
parse_scripts
The ^, _ and primes after a noad: its superscript and subscript lists.
Attributes: pure, recursive
subroutine parse_scripts(tree, source, at, noad)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
source | character(len=*) | in | LaTeX math. | |
at | integer(kind=I4P) | inout | Position (at the first script sign). | |
noad | integer(kind=I4P) | in | The noad. |
Call graph
parse_argument
A macro's or a script's argument: a {...} group, else one atom.
Attributes: pure, recursive
subroutine parse_argument(tree, source, at, head)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
source | character(len=*) | in | LaTeX math. | |
at | integer(kind=I4P) | inout | Position. | |
head | integer(kind=I4P) | out | First noad. |
Call graph
parse_atom
One atom at at: a character, a command, a group as an Ord; 0 for nothing (a font switch's empty group).
Attributes: pure, recursive
subroutine parse_atom(tree, source, at, noad)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
source | character(len=*) | in | LaTeX math. | |
at | integer(kind=I4P) | inout | Position. | |
noad | integer(kind=I4P) | out | Noad. |
Call graph
text_argument
The {...} argument of \mathrm and its kin: its characters (blanks skipped, as math does; kept in \text) in a text face, as Ord noads.
Attributes: pure
subroutine text_argument(tree, source, at, face, head)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
source | character(len=*) | in | LaTeX math. | |
at | integer(kind=I4P) | inout | Position. | |
face | integer(kind=I4P) | in | Text face. | |
head | integer(kind=I4P) | out | First noad. |
Call graph
text_list
Ord noads of the characters of text (UTF-8, braces and blanks out) in a text face.
Attributes: pure
subroutine text_list(tree, text, face, head)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
text | character(len=*) | in | Text. | |
face | integer(kind=I4P) | in | Text face. | |
head | integer(kind=I4P) | out | First noad. |
Call graph
delimiter
The delimiter after \left or \right: its math glyph, 0 for ..
Attributes: pure
subroutine delimiter(source, at, glyph)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
source | character(len=*) | in | LaTeX math. | |
at | integer(kind=I4P) | inout | Position. | |
glyph | integer(kind=I4P) | out | Glyph. |
Call graph
math_char
The noad of a character typed in math: letters in math italic, digits and signs upright, each its atom kind.
Attributes: pure
subroutine math_char(tree, code, noad)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
code | integer(kind=I4P) | in | Character. | |
noad | integer(kind=I4P) | out | Noad. |
Call graph
command_code
The character and atom kind of a symbol command, 0 if name is not one.
Attributes: pure
subroutine command_code(name, kind, code)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | Command name. | |
kind | integer(kind=I4P) | out | Atom kind. | |
code | integer(kind=I4P) | out | Character. |
Call graph
new_noad
A fresh noad of kind.
Attributes: pure
subroutine new_noad(tree, kind, noad)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
kind | integer(kind=I4P) | in | Kind. | |
noad | integer(kind=I4P) | out | Noad. |
Call graph
new_char
A noad of kind whose nucleus is the math font's character code.
Attributes: pure
subroutine new_char(tree, kind, code, noad)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
kind | integer(kind=I4P) | in | Kind. | |
code | integer(kind=I4P) | in | Character. | |
noad | integer(kind=I4P) | out | Noad. |
Call graph
set_list
Set the list from head in style (cramped or not) at base size base: its items appended from first, from the list's origin; its width, height and depth.
Attributes: pure, recursive
subroutine set_list(tree, state, head, style, cramped, base, width, height, depth, first)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
state | type(box_state) | inout | Items. | |
head | integer(kind=I4P) | in | First noad. | |
style | integer(kind=I4P) | in | Style. | |
cramped | logical | in | Cramped. | |
base | real(kind=R8P) | in | Base font size. | |
width | real(kind=R8P) | out | Width. | |
height | real(kind=R8P) | out | Height. | |
depth | real(kind=R8P) | out | Depth. | |
first | integer(kind=I4P) | out | First item. |
Call graph
set_noad
Set one noad, its nucleus and scripts, from its origin; a character's italic correction added to its width unless it is the last of its list (as LuaTeX). First item of the list.
Attributes: pure, recursive
subroutine set_noad(tree, state, noad, style, cramped, base, width, height, depth, first, last)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
state | type(box_state) | inout | Items. | |
noad | integer(kind=I4P) | in | Noad. | |
style | integer(kind=I4P) | in | Style. | |
cramped | logical | in | Cramped. | |
base | real(kind=R8P) | in | Base size. | |
width | real(kind=R8P) | out | Width. | |
height | real(kind=R8P) | out | Height. | |
depth | real(kind=R8P) | out | Depth. | |
first | integer(kind=I4P) | out | First item. | |
last | logical | in | The last noad of its list. |
Call graph
set_char
A character in its face at size: in the math font its script alternate in script styles.
Attributes: pure
subroutine set_char(state, face, glyph, code, style, size, width, height, depth, italic)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
state | type(box_state) | inout | Items. | |
face | integer(kind=I4P) | in | Face. | |
glyph | integer(kind=I4P) | in | Glyph. | |
code | integer(kind=I4P) | in | Character. | |
style | integer(kind=I4P) | in | Style. | |
size | real(kind=R8P) | in | Font size. | |
width | real(kind=R8P) | out | Advance. | |
height | real(kind=R8P) | out | Height. | |
depth | real(kind=R8P) | out | Depth. | |
italic | real(kind=R8P) | out | Italic correction. |
Call graph
set_scripts
The scripts of a set nucleus (its box width x height + depth, from its first item), TeX's rule 18 with the MATH constants of the nucleus' style; the box extended by them and the space after scripts.
Attributes: pure, recursive
subroutine set_scripts(tree, state, noad, style, cramped, base, char, italic, width, height, depth, operator)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
state | type(box_state) | inout | Items. | |
noad | integer(kind=I4P) | in | Noad. | |
style | integer(kind=I4P) | in | Style of the nucleus. | |
cramped | logical | in | Cramped. | |
base | real(kind=R8P) | in | Base size. | |
char | logical | in | The nucleus a character. | |
italic | real(kind=R8P) | in | Its italic correction. | |
width | real(kind=R8P) | inout | Box width. | |
height | real(kind=R8P) | inout | Height. | |
depth | real(kind=R8P) | inout | Depth. | |
operator | logical | in | A big operator: the subscript back by the italic correction. |
Call graph
set_fraction
\frac: numerator and denominator one style smaller (the denominator cramped), TeX's rule 15 with the MATH constants, the rule on the axis, both centered, a null delimiter space on each side.
Attributes: pure, recursive
subroutine set_fraction(tree, state, noad, style, cramped, base, width, height, depth)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
state | type(box_state) | inout | Items. | |
noad | integer(kind=I4P) | in | Noad. | |
style | integer(kind=I4P) | in | Style. | |
cramped | logical | in | Cramped. | |
base | real(kind=R8P) | in | Base size. | |
width | real(kind=R8P) | out | Width. | |
height | real(kind=R8P) | out | Height. | |
depth | real(kind=R8P) | out | Depth. |
Call graph
set_radical
\sqrt: the body cramped, the radical's smallest size variant covering it (with the gap and the rule), the rule on the radical's top over the body (TeX's rule 11 with the MATH constants).
Attributes: pure, recursive
subroutine set_radical(tree, state, noad, style, base, width, height, depth)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
state | type(box_state) | inout | Items. | |
noad | integer(kind=I4P) | in | Noad. | |
style | integer(kind=I4P) | in | Style. | |
base | real(kind=R8P) | in | Base size. | |
width | real(kind=R8P) | out | Width. | |
height | real(kind=R8P) | out | Height. | |
depth | real(kind=R8P) | out | Depth. |
Call graph
set_accent
An accent over its body: centered by the top accent attachments (the body's, else half its width; the accent's), raised by the body's height above the accent base height (TeX's rule 12).
Attributes: pure, recursive
subroutine set_accent(tree, state, noad, style, cramped, base, width, height, depth)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
state | type(box_state) | inout | Items. | |
noad | integer(kind=I4P) | in | Noad. | |
style | integer(kind=I4P) | in | Style. | |
cramped | logical | in | Cramped. | |
base | real(kind=R8P) | in | Base size. | |
width | real(kind=R8P) | out | Width. | |
height | real(kind=R8P) | out | Height. | |
depth | real(kind=R8P) | out | Depth. |
Call graph
set_fenced
\left ... \right: the body between delimiters of the smallest size variant covering it around the axis (TeX's \delimiterfactor 901 and \delimitershortfall 5 pt), centered on the axis; an Inner atom.
Attributes: pure, recursive
subroutine set_fenced(tree, state, noad, style, cramped, base, width, height, depth)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
state | type(box_state) | inout | Items. | |
noad | integer(kind=I4P) | in | Noad. | |
style | integer(kind=I4P) | in | Style. | |
cramped | logical | in | Cramped. | |
base | real(kind=R8P) | in | Base size. | |
width | real(kind=R8P) | out | Width. | |
height | real(kind=R8P) | out | Height. | |
depth | real(kind=R8P) | out | Depth. |
Call graph
binary_to_ordinary
TeX's rules 5 and 6: a Bin first, or after Bin, Op, Rel, Open or Punct, or before Rel, Close or Punct, is an Ord.
Attributes: pure
subroutine binary_to_ordinary(tree, head)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
tree | type(noad_tree) | inout | Noads. | |
head | integer(kind=I4P) | in | First noad. |
Call graph
glyph_box
The advance, height, depth and italic correction of a glyph at size.
Attributes: pure
subroutine glyph_box(face, glyph, size, width, height, depth, italic)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
face | integer(kind=I4P) | in | Face. | |
glyph | integer(kind=I4P) | in | Glyph. | |
size | real(kind=R8P) | in | Font size. | |
width | real(kind=R8P) | out | Advance. | |
height | real(kind=R8P) | out | Height. | |
depth | real(kind=R8P) | out | Depth. | |
italic | real(kind=R8P) | out | Italic correction. |
Call graph
add_glyph
Append a glyph.
Attributes: pure
subroutine add_glyph(state, face, glyph, code, x, y, size)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
state | type(box_state) | inout | Items. | |
face | integer(kind=I4P) | in | Face. | |
glyph | integer(kind=I4P) | in | Glyph. | |
code | integer(kind=I4P) | in | Character. | |
x | real(kind=R8P) | in | Abscissa. | |
y | real(kind=R8P) | in | Ordinate, up. | |
size | real(kind=R8P) | in | Font size. |
Call graph
add_rule
Append a rule: its left, bottom, width and thickness.
Attributes: pure
subroutine add_rule(state, x, y, width, thickness)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
state | type(box_state) | inout | Items. | |
x | real(kind=R8P) | in | Left. | |
y | real(kind=R8P) | in | Bottom, up. | |
width | real(kind=R8P) | in | Width. | |
thickness | real(kind=R8P) | in | Thickness. |
Call graph
shift
Move the items from first to last.
Attributes: pure
subroutine shift(state, first, last, dx, dy)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
state | type(box_state) | inout | Items. | |
first | integer(kind=I4P) | in | First item. | |
last | integer(kind=I4P) | in | Last item. | |
dx | real(kind=R8P) | in | Abscissa shift. | |
dy | real(kind=R8P) | in | Ordinate shift, up. |
Call graph
skip_blanks
Past the blanks at at.
Attributes: pure
subroutine skip_blanks(source, at)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
source | character(len=*) | in | Text. | |
at | integer(kind=I4P) | inout | Position. |
Call graph
utf8_code
The code point of the UTF-8 character at at and its bytes.
Attributes: pure
subroutine utf8_code(text, at, code, n)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Text. | |
at | integer(kind=I4P) | in | Position. | |
code | integer(kind=I4P) | out | Code point. | |
n | integer(kind=I4P) | out | Bytes. |
Call graph
Functions
has_math
Whether text holds math (next_math).
Attributes: pure
Returns: logical
function has_math(text) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
text | character(len=*) | in | Text. |
Call graph
any_upm
Units to the em of a text face (1-8) or of the math font (MATH_FACE).
Attributes: pure
Returns: integer(kind=I4P)
function any_upm(face) result(upm)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
face | integer(kind=I4P) | in | Face. |
Call graph
any_advance
Advance of a glyph of a text face or of the math font [font units].
Attributes: pure
Returns: integer(kind=I4P)
function any_advance(face, glyph) result(advance)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
face | integer(kind=I4P) | in | Face. | |
glyph | integer(kind=I4P) | in | Glyph. |
Call graph
atom_kind
The atom kind a noad spaces as: fractions, radicals and accents Ord (LaTeX's \frac a group), fenced lists Inner.
Attributes: elemental
Returns: integer(kind=I4P)
function atom_kind(kind) result(atom)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
kind | integer(kind=I4P) | in | Noad kind. |
Call graph
em
Font units of the math font at size.
Attributes: pure
Returns: real(kind=R8P)
function em(units, size) result(length)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
units | integer(kind=I4P) | in | Font units. | |
size | real(kind=R8P) | in | Font size. |
Call graph
axis
The math axis at size.
Attributes: pure
Returns: real(kind=R8P)
function axis(size) result(height)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
size | real(kind=R8P) | in | Font size. |
Call graph
starts
source has word at at.
Attributes: pure
Returns: logical
function starts(source, at, word) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
source | character(len=*) | in | Text. | |
at | integer(kind=I4P) | in | Position. | |
word | character(len=*) | in | Word. |
Call graph
is_letter
An ASCII letter.
Attributes: elemental
Returns: logical
function is_letter(ch) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
ch | character(len=1) | in | Character. |
Call graph
word_number
The rank of word among the blank-separated words, 0 if absent.
Attributes: pure
Returns: integer(kind=I4P)
function word_number(words, word) result(k)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
words | character(len=*) | in | Words. | |
word | character(len=*) | in | Word. |
Call graph