PrF UG slots value type float

From Protege Wiki

Jump to: navigation, search

The Float Value Type


Protege-Frames User's Guide
Slots
The Slots Tab
The Slot Browser
The Slot Buttons
The Slot Menu
The Slot Editor
The Value Type Menu
The Any Value Type
The Boolean Value Type
The Class Value Type
The Float Value Type
The Instance Value Type
The Integer Value Type
The String Value Type
The Symbol Value Type
Creating a New Slot
Viewing a Slot
Editing a Top-Level Slot
Overriding Slot Properties at a Class
Editing Slot Properties
Removing a Slot from a Class
Deleting a Slot from the Project
Adding a Slot to a Class
Removing Overrides From a Slot
Understanding Inverse Slots
Creating an Inverse Slot Relationship
Working with Subslots
Finding a Slot
The Slot Hierarchy Window
The Slot Icons
The Superslots Pane
Glossary, Editing Help

A slot of type Float has numbers as values; these numbers may include a decimal point. Values of type Float are stored on your system as floating-point values, and are only as accurate as the representation used by your system.

Setting the Value Type to Float

To set the value type of a slot to Float:

  1. Create the slot, or view the Slot Editor for an existing slot.

  2. Select Float from the Value Type menu.

  3. Fill in the other facets of the slot as desired.

Minimum and Maximum Values

For slots of type Float, you can enter a Minimum and/or Maximum value. See The Slot Editor for more information:

  • Minimum allows you to specify a minimum value for your slot. When an instance is created for a class with this slot, the value of the slot must be greater than or equal to the minimum. For example, a minimum of zero means instances cannot have negative values.

  • Maximum allows you to specify a maximum value for your slot. When an instance is created for a class with this slot, the value of the slot must be less than or equal to the maximum.

  • Together, Minimum and Maximum can be used to define an allowable range.

When present, the Minimum and/or Maximum values are displayed in the last column of the Template Slots pane.

Entering Floating-Point Numbers for an Instance

When entering a Float value for an instance, you can use decimal point or exponential representation. You can enter positive and negative values. For example:

Representation Description
1234.56 Standard decimal notation.
1.23456E3 or 1.2345e3

Exponential notation; the example is shorthand for 1.23456 · 103. Represents 1234.56 (For convenience in typing, you can enter a lower case e, instead of an uppercase E.)

-1234.56 Negative number.
1.23456E-3 or 1.2345e-3

Exponential notation with a negative exponent, shorthand for 1.23456 · 10-3. Represents 0.00123456.


Personal tools