Page last modified 12:48, 28 May 2018 by villes

.floor() Redirected from User Guides/myXML/5: OCL Rules/Available methods for OCL base types/.floor()

    Table of contents

    Description of the method

     

    Description: .floor() method returns the intiger quotient of the given value.
    Available for: integer, real
    Parameters: -
    Return type: integer

     

    Example

    Context: TransactionType1
    OCL: self.Amount.floor() = 30
    Description: The example rule compares the intiger quotient of the amount to the integer 30. If the integer quotient is 30, true will be returned. 


    The XML snippet below would pass this check.

    <Amount>30</Amount>

    Also the XML snippet below would pass this check.

    <Amount>30.95</Amount>

    The snippet below however would not pass this check. 

    <Amount>25</Amount>

    Menu