DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:struct:type_decimal

This is an old revision of the document!


Struct PluginTypes

Struct Plugin: Type Decimal

The Decimal type holds decimal numbers also known as float or double. Upper and lower bounds can be set through the config. The decimal point can be configured. Internally a dot is always used and saved. Thousand separators are not supported.

Configuration

The following configuration is available in addition to the basic type configuration:

Config Format Description
format string A sprintf format string to output the number (should contain some variation on %f)
min integer The number has to be at least this value. Be sure to specify decimals with a . as decimal point!
max integer The number may be at most this value. Be sure to specify decimals with a . as decimal point!
decpoint char The character to use as a decimal point in output. You probably want to use either . or ,. Regardless of this setting, users may always enter values with either of the two.
plugin/struct/type_decimal.1459929630.txt.gz · Last modified: 2016-04-06 10:00 by andi