____ | Up | Next | Back | Forward
TOC -- / --.-- / --.--.-- | Index | Search | Syntax | Help


F.3.1 Picture String Formation

(1)
A well-formed picture String, or simply picture String, is a String value that conforms to the syntactic rules, composition constraints, and character replication conventions specified in this clause.
Dynamic Semantics
(2)
(blank)
(3)
       picture_string ::=
          fixed_$_picture_string
        | fixed_#_picture_string
        | floating_currency_picture_string
        | non_currency_picture_string
(4)
       fixed_$_picture_string ::=
          [fixed_LHS_sign] fixed_$_char {direct_insertion} [zero_suppression]
            number [RHS_sign]

        | [fixed_LHS_sign {direct_insertion}] [zero_suppression]
            number fixed_$_char {direct_insertion} [RHS_sign]

        | floating_LHS_sign number fixed_$_char {direct_insertion} [RHS_sign]

        | [fixed_LHS_sign] fixed_$_char {direct_insertion}
            all_zero_suppression_number {direct_insertion}  [RHS_sign]

        | [fixed_LHS_sign {direct_insertion}] all_zero_suppression_number {direct_insertion}
            fixed_$_char {direct_insertion} [RHS_sign]

        | all_sign_number {direct_insertion} fixed_$_char {direct_insertion} [RHS_sign]
(5)
       fixed_#_picture_string ::=
          [fixed_LHS_sign] single_#_currency {direct_insertion}
            [zero_suppression] number [RHS_sign]

        | [fixed_LHS_sign] multiple_#_currency {direct_insertion}
            zero_suppression number [RHS_sign]

        | [fixed_LHS_sign {direct_insertion}] [zero_suppression]
            number fixed_#_currency {direct_insertion} [RHS_sign]

        | floating_LHS_sign number fixed_#_currency {direct_insertion} [RHS_sign]

        | [fixed_LHS_sign] single_#_currency {direct_insertion}
            all_zero_suppression_number {direct_insertion} [RHS_sign]

        | [fixed_LHS_sign] multiple_#_currency {direct_insertion}
            all_zero_suppression_number {direct_insertion} [RHS_sign]

        | [fixed_LHS_sign {direct_insertion}] all_zero_suppression_number {direct_insertion}
            fixed_#_currency {direct_insertion} [RHS_sign]

        | all_sign_number {direct_insertion} fixed_#_currency {direct_insertion} [RHS_sign]
(6)
       floating_currency_picture_string ::=
          [fixed_LHS_sign] {direct_insertion} floating_$_currency number [RHS_sign]
        | [fixed_LHS_sign] {direct_insertion} floating_#_currency number [RHS_sign]
        | [fixed_LHS_sign] {direct_insertion} all_currency_number {direct_insertion} [RHS_sign]
(7)
       non_currency_picture_string ::=
          [fixed_LHS_sign {direct_insertion}] zero_suppression number [RHS_sign]
        | [floating_LHS_sign] number [RHS_sign]
        | [fixed_LHS_sign {direct_insertion}] all_zero_suppression_number {direct_insertion} [RHS_sign]
        | all_sign_number {direct_insertion}
        | fixed_LHS_sign direct_insertion {direct_insertion} number [RHS_sign]
(8)
       fixed_LHS_sign ::=  LHS_Sign
(9)
       LHS_Sign ::=  + | - | <

(10)
       fixed_$_char ::= $

(11)
       direct_insertion ::=  simple_insertion
(12)
       simple_insertion ::=  _ | B | 0 | /

(13)
       zero_suppression ::=  Z {Z | context_sensitive_insertion} | fill_string
(14)
       context_sensitive_insertion ::=  simple_insertion

(15)
       fill_string ::=  * {* | context_sensitive_insertion}

(16)
       number ::=
          fore_digits [radix [aft_digits] {direct_insertion}]
        | radix aft_digits {direct_insertion}
(17)
       fore_digits ::= 9 {9 | direct_insertion}
(18)
       aft_digits ::=  {9 | direct_insertion} 9
(19)
       radix ::= . | V

(20)
       RHS_sign ::= + | - | > | CR | DB

(21)
       floating_LHS_sign ::=
          LHS_Sign {context_sensitive_insertion} LHS_Sign {LHS_Sign | context_sensitive_insertion}

(22)
       single_#_currency ::= #
(23)
       multiple_#_currency ::= ## {#}

(24)
       fixed_#_currency ::= single_#_currency | multiple_#_currency

(25)
       floating_$_currency ::=
          $ {context_sensitive_insertion} $ {$ | context_sensitive_insertion}

(26)
       floating_#_currency ::=
          # {context_sensitive_insertion} # {# | context_sensitive_insertion}

(27)
       all_sign_number ::=  all_sign_fore [radix [all_sign_aft]] [>]
(28)
       all_sign_fore ::=
          sign_char {context_sensitive_insertion} sign_char {sign_char | context_sensitive_insertion}
(29)
       all_sign_aft ::= {all_sign_aft_char} sign_char

       all_sign_aft_char ::=  sign_char | context_sensitive_insertion
(30)
       sign_char ::= + | - | <

(31)
       all_currency_number ::=  all_currency_fore [radix [all_currency_aft]]
(32)
       all_currency_fore ::=
          currency_char {context_sensitive_insertion}
            currency_char {currency_char | context_sensitive_insertion}
(33)
       all_currency_aft ::= {all_currency_aft_char} currency_char

       all_currency_aft_char ::= currency_char | context_sensitive_insertion
(34)
       currency_char ::= $ | #

(35)
       all_zero_suppression_number ::=  all_zero_suppression_fore [ radix [all_zero_suppression_aft]]
(36)
       all_zero_suppression_fore ::=
          zero_suppression_char {zero_suppression_char | context_sensitive_insertion}
(37)
       all_zero_suppression_aft ::= {all_zero_suppression_aft_char} zero_suppression_char

       all_zero_suppression_aft_char ::=  zero_suppression_char | context_sensitive_insertion
(38)
       zero_suppression_char ::= Z | *
(39)
The following composition constraints apply to a picture String:
(40)
(41)
(42)
(43)
(44)
(45)
(46)
(47)
A replicable Character is a Character that, by the above rules, can occur in two consecutive positions in a picture String.
(48)
A Character replication is a String
(49)
       char & '(' & spaces & count_string & ')'
(50)
where char is a replicable Character, spaces is a String (possibly empty) comprising only space Character values, and count_string is a String of one or more decimal digit Character values. A Character replication in a picture String has the same effect as (and is said to be equivalent to) a String comprising n consecutive occurrences of char, where n=Integer'Value(count_string).
(51)
An expanded picture String is a picture String containing no Character replications.

(52)

____ | Up | Next | Back | Forward
TOC -- / --.-- / --.--.-- | Index | Search | Syntax | Help

Ada WWW Home -- Email comments, additions, corrections, gripes, kudos, etc. to:

Magnus Kempe -- Magnus.Kempe@di.epfl.ch
Copyright statement
Page last generated: 95-03-12