ftd
has support for rich data modelling, and it supports declaring variables.-- integer x: 20
type
s.ftd
can guess the type based on the value:-- integer x: 20
-- integer x: 10 -- integer y: $x
-- integer x: 10 -- $x: 20
$processor$
: dynamic variablesftd
documents are processed in the context of a “platform”, and platform can
provide access to dynamic variables.
Say platform has provided a dynamic variable os
, which is the operating system
on which this document is getting rendered, you can use that like this:
-- string name-of-os: $processor$: os
type
is mandatory when using $processor$
. Available processors would be
documented as part of platform documentation.
Processors can also look at data passed, so its possible to create a processor:
-- string greeting: hello, world $processor$: uppercase
uppercase
, which takes the current value, hello, world
and returns its upper case value. In this case the variable greeting will hold the value: HELLO, WORLD
.