PrF UG inst entry field float

From Protege Wiki
Jump to: navigation, search

The Float Fields


Protege-Frames User's Guide
Instances
Instances Tab
Class Browser at Instances Tab
Instance Browser
Instances Window
Instance Buttons
Instance Menu
Types Pane
Instance Editor
Standard Field Types
Fields with Multiple Cardinality
Boolean Fields
Class Fields
Float Fields
Instance Fields
Integer Fields
String Fields
Symbol Fields
Creating an Instance
Creating Multiple Instances
Displaying the Instance Editor
Setting the Display Slot
Showing Subclass Instances
Editing an Instance
Copying an Instance
Deleting an Instance
Finding an Instance
Changing an Instance's Class
Working with Instance Types
Instance Icons
Glossary, Editing Help

When an instance is created for a class with a slot of Value Type Float, the entry field corresponding to the slot is a Float entry field, and takes 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 your system allows.

Entering Floating-Point Numbers

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

-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.

For convenience in typing, when using exponential notation, you can enter either e or E.

Single Cardinality

The entry field corresponding to a slot of value type Float with Cardinality Single can contain a single floating-point number. It appears as an entry bar:

Single Cardinality entry field
  • To set or edit the value, simply click in the entry field and make your edits.

  • To clear the slot, delete the value in the entry bar.

Invalid entry in a Float field

If you enter text or other invalid information (e.g., values less than the minimum or greater than the maximum) in a Float entry field, the entered information will be displayed in red and will not saved by the system. The previous value (if any) will be used, instead.

Float field with invalid entry

Multiple Cardinality

An instance with a Float/Multiple slot shows a display list with three buttons. This field contains a list of floating-point values. If the at most value is set in the Cardinality field for the slot, there is a limit on the number of values you can enter.

Multiple Cardinality display list

To edit a pre-existing value for a Float/Multiple slot:

  1. Select the value you want to edit.

  2. Click the View Value (all_object.view) button. An Edit Float Value dialog box will be displayed.

  3. Edit the number directly in the dialog box.

  4. Click OK.

To add a value to a Float/Multiple slot:

  1. Click the Create Value (all_object.add) button. A Create Float Value dialog box will be displayed.

  2. Enter the number you want in the entry bar. The number may include a decimal point.

  3. Click OK.

To remove a value from a Float/Multiple slot:

  1. Select the value(s) you want to remove. You can select multiple values by holding down the Ctrl (Cmd) key.

  2. Click the Remove Value (all_object.remove) button. The selected values will be removed.